home *** CD-ROM | disk | FTP | other *** search
/ Beginning Mac Programming / Beginning Mac Programming.bin / pc / Open Me for REALbasic 3 / REALbasic 3.2 / Example Projects / Reusable Classes_Code / User Interface / MS Style Controls / Classes / CBetterPopupMenu next >
Unknown  |  2000-02-28  |  22.3 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default
100% TrID PGN (Portable Gaming Notation) Compressed format default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 05 43 6c 61 73 73 10 43 | 42 65 74 74 65 72 50 6f |.Class.C|BetterPo|
|00000010| 70 75 70 4d 65 6e 75 2f | a2 01 a4 0e b6 09 07 00 |pupMenu/|........|
|00000020| 10 43 42 65 74 74 65 72 | 50 6f 70 75 70 4d 65 6e |.CBetter|PopupMen|
|00000030| 75 80 03 06 43 61 6e 76 | 61 73 00 17 16 50 4d 65 |u...Canv|as...PMe|
|00000040| 6e 75 48 61 6e 64 6c 65 | 20 61 73 20 69 6e 74 65 |nuHandle| as inte|
|00000050| 67 65 72 01 11 4d 65 6e | 75 49 44 20 61 73 20 69 |ger..Men|uID as i|
|00000060| 6e 74 65 67 65 72 00 16 | 50 4d 65 6e 75 48 56 61 |nteger..|PMenuHVa|
|00000070| 6c 69 64 20 61 73 20 62 | 6f 6f 6c 65 61 6e 01 10 |lid as b|oolean..|
|00000080| 53 74 79 6c 65 20 61 73 | 20 69 6e 74 65 67 65 72 |Style as| integer|
|00000090| 00 15 50 4c 69 73 74 49 | 6e 64 65 78 20 61 73 20 |..PListI|ndex as |
|000000a0| 69 6e 74 65 67 65 72 01 | 18 42 75 74 74 6f 6e 54 |integer.|.ButtonT|
|000000b0| 65 78 74 46 6f 6e 74 20 | 61 73 20 73 74 72 69 6e |extFont |as strin|
|000000c0| 67 00 19 42 75 74 74 6f | 6e 54 65 78 74 53 69 7a |g..Butto|nTextSiz|
|000000d0| 65 20 61 73 20 69 6e 74 | 65 67 65 72 00 15 74 65 |e as int|eger..te|
|000000e0| 78 74 44 69 73 61 62 6c | 65 64 20 61 73 20 63 6f |xtDisabl|ed as co|
|000000f0| 6c 6f 72 00 12 64 61 72 | 6b 42 65 76 65 6c 20 61 |lor..dar|kBevel a|
|00000100| 73 20 63 6f 6c 6f 72 00 | 13 6c 69 67 68 74 42 65 |s color.|.lightBe|
|00000110| 76 65 6c 20 61 73 20 63 | 6f 6c 6f 72 00 12 42 61 |vel as c|olor..Ba|
|00000120| 63 6b 43 6f 6c 6f 72 20 | 61 73 20 63 6f 6c 6f 72 |ckColor |as color|
|00000130| 00 1a 42 61 63 6b 43 6f | 6c 6f 72 44 69 73 61 62 |..BackCo|lorDisab|
|00000140| 6c 65 64 20 61 73 20 43 | 6f 6c 6f 72 00 12 54 65 |led as C|olor..Te|
|00000150| 78 74 46 6f 6e 74 20 61 | 73 20 73 74 72 69 6e 67 |xtFont a|s string|
|00000160| 00 13 54 65 78 74 53 69 | 7a 65 20 61 73 20 69 6e |..TextSi|ze as in|
|00000170| 74 65 67 65 72 00 16 41 | 75 74 6f 43 65 6e 74 65 |teger..A|utoCente|
|00000180| 72 56 20 61 73 20 62 6f | 6f 6c 65 61 6e 00 11 62 |rV as bo|olean..b|
|00000190| 75 66 66 65 72 20 61 73 | 20 70 69 63 74 75 72 65 |uffer as| picture|
|000001a0| 01 11 63 61 70 74 69 6f | 6e 20 61 73 20 73 74 72 |..captio|n as str|
|000001b0| 69 6e 67 00 0d 67 20 61 | 73 20 67 72 61 70 68 69 |ing..g a|s graphi|
|000001c0| 63 73 01 11 69 6e 44 6f | 77 6e 20 61 73 20 62 6f |cs..inDo|wn as bo|
|000001d0| 6f 6c 65 61 6e 01 15 70 | 69 63 74 4e 6f 72 6d 61 |olean..p|ictNorma|
|000001e0| 6c 20 61 73 20 70 69 63 | 74 75 72 65 00 10 73 74 |l as pic|ture..st|
|000001f0| 61 74 65 20 61 73 20 69 | 6e 74 65 67 65 72 00 13 |ate as i|nteger..|
|00000200| 74 65 78 74 41 63 74 69 | 76 65 20 61 73 20 63 6f |textActi|ve as co|
|00000210| 6c 6f 72 00 14 72 65 73 | 49 63 6f 6e 49 44 20 61 |lor..res|IconID a|
|00000220| 73 20 69 6e 74 65 67 65 | 72 00 2a 0c 50 44 69 73 |s intege|r.*.PDis|
|00000230| 70 6c 61 79 4d 65 6e 75 | 00 00 01 23 82 01 23 82 |playMenu|...#..#.|
|00000240| 01 35 12 53 75 62 20 50 | 44 69 73 70 6c 61 79 4d |.5.Sub P|DisplayM|
|00000250| 65 6e 75 28 29 1e 64 69 | 6d 20 52 65 73 75 6c 74 |enu().di|m Result|
|00000260| 2c 4e 65 77 49 6e 64 65 | 78 20 61 73 20 69 6e 74 |,NewInde|x as int|
|00000270| 65 67 65 72 18 64 69 6d | 20 66 61 6d 49 44 20 61 |eger.dim| famID a|
|00000280| 73 20 4d 65 6d 6f 72 79 | 42 6c 6f 63 6b 00 1e 64 |s Memory|Block..d|
|00000290| 69 6d 20 6f 6c 64 46 6f | 6e 74 2c 6f 6c 64 53 69 |im oldFo|nt,oldSi|
|000002a0| 7a 65 20 61 73 20 69 6e | 74 65 67 65 72 00 16 69 |ze as in|teger..i|
|000002b0| 66 20 6d 65 2e 50 4d 65 | 6e 75 48 56 61 6c 69 64 |f me.PMe|nuHValid|
|000002c0| 20 74 68 65 6e 85 02 64 | 65 63 6c 61 72 65 20 66 | then..d|eclare f|
|000002d0| 75 6e 63 74 69 6f 6e 20 | 50 6f 70 55 70 4d 65 6e |unction |PopUpMen|
|000002e0| 75 53 65 6c 65 63 74 20 | 6c 69 62 20 22 49 6e 74 |uSelect |lib "Int|
|000002f0| 65 72 66 61 63 65 4c 69 | 62 22 20 28 74 68 65 4d |erfaceLi|b" (theM|
|00000300| 65 6e 75 20 61 73 20 69 | 6e 74 65 67 65 72 2c 74 |enu as i|nteger,t|
|00000310| 6f 70 20 61 73 20 69 6e | 74 65 67 65 72 2c 6c 65 |op as in|teger,le|
|00000320| 66 74 20 61 73 20 69 6e | 74 65 67 65 72 2c 64 66 |ft as in|teger,df|
|00000330| 4d 49 74 65 6d 20 61 73 | 20 69 6e 74 65 67 65 72 |MItem as| integer|
|00000340| 29 20 61 73 20 69 6e 74 | 65 67 65 72 92 01 64 65 |) as int|eger..de|
|00000350| 63 6c 61 72 65 20 66 75 | 6e 63 74 69 6f 6e 20 49 |clare fu|nction I|
|00000360| 6e 73 65 72 74 4d 65 6e | 75 20 6c 69 62 20 22 49 |nsertMen|u lib "I|
|00000370| 6e 74 65 72 66 61 63 65 | 4c 69 62 22 20 28 74 68 |nterface|Lib" (th|
|00000380| 65 4d 65 6e 75 20 61 73 | 20 69 6e 74 65 67 65 72 |eMenu as| integer|
|00000390| 2c 69 74 65 6d 4e 20 61 | 73 20 73 68 6f 72 74 29 |,itemN a|s short)|
|000003a0| 3d 64 65 63 6c 61 72 65 | 20 73 75 62 20 44 65 6c |=declare| sub Del|
|000003b0| 65 74 65 4d 65 6e 75 20 | 6c 69 62 20 22 49 6e 74 |eteMenu |lib "Int|
|000003c0| 65 72 66 61 63 65 4c 69 | 62 22 20 28 6d 65 6e 75 |erfaceLi|b" (menu|
|000003d0| 49 44 20 61 73 20 69 6e | 74 65 67 65 72 29 00 80 |ID as in|teger)..|
|000003e0| 01 64 65 63 6c 61 72 65 | 20 73 75 62 20 49 6e 76 |.declare| sub Inv|
|000003f0| 61 6c 4d 65 6e 75 42 61 | 72 20 4c 69 62 20 22 49 |alMenuBa|r Lib "I|
|00000400| 6e 74 65 72 66 61 63 65 | 4c 69 62 22 20 28 29 20 |nterface|Lib" () |
|00000410| 49 6e 6c 69 6e 65 36 38 | 4b 28 22 41 38 31 44 22 |Inline68|K("A81D"|
|00000420| 29 00 93 01 2f 2f 61 20 | 63 6f 75 70 6c 65 20 6f |)...//a |couple o|
|00000430| 66 20 4c 6f 77 4d 65 6d | 20 63 61 6c 6c 73 2e 2e |f LowMem| calls..|
|00000440| 2e 20 77 61 74 63 68 20 | 6f 75 74 20 2d 20 74 68 |. watch |out - th|
|00000450| 65 79 20 77 69 6c 6c 20 | 70 72 6f 62 61 62 6c 79 |ey will |probably|
|00000460| 20 6e 6f 74 20 77 6f 72 | 6b 20 75 6e 64 65 72 20 | not wor|k under |
|00000470| 43 61 72 62 6f 6e 21 95 | 01 64 65 63 6c 61 72 65 |Carbon!.|.declare|
|00000480| 20 73 75 62 20 4c 4d 53 | 65 74 53 79 73 46 6f 6e | sub LMS|etSysFon|
|00000490| 74 46 61 6d 20 4c 69 62 | 20 22 49 6e 74 65 72 66 |tFam Lib| "Interf|
|000004a0| 61 63 65 4c 69 62 22 20 | 28 76 61 6c 75 65 20 61 |aceLib" |(value a|
|000004b0| 73 20 53 68 6f 72 74 29 | 20 49 6e 6c 69 6e 65 36 |s Short)| Inline6|
|000004c0| 38 4b 28 22 33 31 44 46 | 30 42 41 36 22 29 96 01 |8K("31DF|0BA6")..|
|000004d0| 64 65 63 6c 61 72 65 20 | 73 75 62 20 4c 4d 53 65 |declare |sub LMSe|
|000004e0| 74 53 79 73 46 6f 6e 74 | 53 69 7a 65 20 4c 69 62 |tSysFont|Size Lib|
|000004f0| 20 22 49 6e 74 65 72 66 | 61 63 65 4c 69 62 22 20 | "Interf|aceLib" |
|00000500| 28 76 61 6c 75 65 20 61 | 73 20 53 68 6f 72 74 29 |(value a|s Short)|
|00000510| 20 49 6e 6c 69 6e 65 36 | 38 4b 28 22 33 31 44 46 | Inline6|8K("31DF|
|00000520| 30 42 41 38 22 29 98 01 | 64 65 63 6c 61 72 65 20 |0BA8")..|declare |
|00000530| 73 75 62 20 4c 4d 53 65 | 74 4c 61 73 74 53 50 45 |sub LMSe|tLastSPE|
|00000540| 78 74 72 61 20 4c 69 62 | 20 22 49 6e 74 65 72 66 |xtra Lib| "Interf|
|00000550| 61 63 65 4c 69 62 22 20 | 28 76 61 6c 75 65 20 61 |aceLib" |(value a|
|00000560| 73 20 49 6e 74 65 67 65 | 72 29 20 49 6e 6c 69 6e |s Intege|r) Inlin|
|00000570| 65 36 38 4b 28 22 32 31 | 44 46 30 42 34 43 22 29 |e68K("21|DF0B4C")|
|00000580| 95 01 64 65 63 6c 61 72 | 65 20 66 75 6e 63 74 69 |..declar|e functi|
|00000590| 6f 6e 20 4c 4d 47 65 74 | 53 79 73 46 6f 6e 74 46 |on LMGet|SysFontF|
|000005a0| 61 6d 20 4c 69 62 20 22 | 49 6e 74 65 72 66 61 63 |am Lib "|Interfac|
|000005b0| 65 4c 69 62 22 20 28 29 | 20 61 73 20 53 68 6f 72 |eLib" ()| as Shor|
|000005c0| 74 20 49 6e 6c 69 6e 65 | 36 38 4b 28 22 33 45 42 |t Inline|68K("3EB|
|000005d0| 38 30 42 41 36 22 29 96 | 01 64 65 63 6c 61 72 65 |80BA6").|.declare|
|000005e0| 20 66 75 6e 63 74 69 6f | 6e 20 4c 4d 47 65 74 53 | functio|n LMGetS|
|000005f0| 79 73 46 6f 6e 74 53 69 | 7a 65 20 4c 69 62 20 22 |ysFontSi|ze Lib "|
|00000600| 49 6e 74 65 72 66 61 63 | 65 4c 69 62 22 20 28 29 |Interfac|eLib" ()|
|00000610| 20 61 73 20 53 68 6f 72 | 74 20 49 6e 6c 69 6e 65 | as Shor|t Inline|
|00000620| 36 38 4b 28 22 33 45 42 | 38 30 42 41 38 22 29 00 |68K("3EB|80BA8").|
|00000630| 00 9b 01 64 65 63 6c 61 | 72 65 20 73 75 62 20 47 |...decla|re sub G|
|00000640| 65 74 46 4e 75 6d 20 4c | 69 62 20 22 49 6e 74 65 |etFNum L|ib "Inte|
|00000650| 72 66 61 63 65 4c 69 62 | 22 20 28 6e 61 6d 65 20 |rfaceLib|" (name |
|00000660| 61 73 20 50 53 74 72 69 | 6e 67 2c 20 66 61 6d 69 |as PStri|ng, fami|
|00000670| 6c 79 49 44 20 61 73 20 | 50 74 72 29 20 49 6e 6c |lyID as |Ptr) Inl|
|00000680| 69 6e 65 36 38 4b 28 22 | 41 39 30 30 22 29 00 35 |ine68K("|A900").5|
|00000690| 69 66 20 6d 65 2e 74 65 | 78 74 46 6f 6e 74 20 3c |if me.te|xtFont <|
|000006a0| 3e 20 22 53 79 73 74 65 | 6d 22 20 61 6e 64 20 6d |> "Syste|m" and m|
|000006b0| 65 2e 74 65 78 74 46 6f | 6e 74 20 3c 3e 20 22 22 |e.textFo|nt <> ""|
|000006c0| 20 74 68 65 6e 1b 6f 6c | 64 46 6f 6e 74 20 3d 20 | then.ol|dFont = |
|000006d0| 4c 4d 47 65 74 53 79 73 | 46 6f 6e 74 46 61 6d 28 |LMGetSys|FontFam(|
|000006e0| 29 1c 6f 6c 64 53 69 7a | 65 20 3d 20 4c 4d 47 65 |).oldSiz|e = LMGe|
|000006f0| 74 53 79 73 46 6f 6e 74 | 53 69 7a 65 28 29 00 19 |tSysFont|Size()..|
|00000700| 66 61 6d 49 44 20 3d 20 | 4e 65 77 4d 65 6d 6f 72 |famID = |NewMemor|
|00000710| 79 42 6c 6f 63 6b 28 32 | 29 19 47 65 74 46 4e 75 |yBlock(2|).GetFNu|
|00000720| 6d 20 6d 65 2e 54 65 78 | 74 46 6f 6e 74 2c 66 61 |m me.Tex|tFont,fa|
|00000730| 6d 49 44 1e 4c 4d 53 65 | 74 53 79 73 46 6f 6e 74 |mID.LMSe|tSysFont|
|00000740| 46 61 6d 20 66 61 6d 49 | 44 2e 73 68 6f 72 74 28 |Fam famI|D.short(|
|00000750| 30 29 1c 4c 4d 53 65 74 | 53 79 73 46 6f 6e 74 53 |0).LMSet|SysFontS|
|00000760| 69 7a 65 20 6d 65 2e 54 | 65 78 74 53 69 7a 65 13 |ize me.T|extSize.|
|00000770| 4c 4d 53 65 74 4c 61 73 | 74 53 50 45 78 74 72 61 |LMSetLas|tSPExtra|
|00000780| 20 2d 31 03 65 6e 64 00 | 1c 49 6e 73 65 72 74 4d | -1.end.|.InsertM|
|00000790| 65 6e 75 20 6d 65 2e 50 | 4d 65 6e 75 48 61 6e 64 |enu me.P|MenuHand|
|000007a0| 6c 65 2c 2d 31 ae 01 52 | 65 73 75 6c 74 20 3d 20 |le,-1..R|esult = |
|000007b0| 50 6f 70 75 70 4d 65 6e | 75 53 65 6c 65 63 74 28 |PopupMen|uSelect(|
|000007c0| 6d 65 2e 50 4d 65 6e 75 | 48 61 6e 64 6c 65 2c 6d |me.PMenu|Handle,m|
|000007d0| 65 2e 77 69 6e 64 6f 77 | 2e 74 6f 70 20 2b 20 6d |e.window|.top + m|
|000007e0| 65 2e 74 6f 70 20 2b 31 | 20 2b 20 6d 65 2e 68 65 |e.top +1| + me.he|
|000007f0| 69 67 68 74 2c 20 6d 65 | 2e 77 69 6e 64 6f 77 2e |ight, me|.window.|
|00000800| 6c 65 66 74 20 2b 20 6d | 65 2e 6c 65 66 74 20 2b |left + m|e.left +|
|00000810| 20 31 2c 31 29 00 35 69 | 66 20 6d 65 2e 74 65 78 | 1,1).5i|f me.tex|
|00000820| 74 46 6f 6e 74 20 3c 3e | 20 22 53 79 73 74 65 6d |tFont <>| "System|
|00000830| 22 20 61 6e 64 20 6d 65 | 2e 74 65 78 74 46 6f 6e |" and me|.textFon|
|00000840| 74 20 3c 3e 20 22 22 20 | 74 68 65 6e 17 4c 4d 53 |t <> "" |then.LMS|
|00000850| 65 74 53 79 73 46 6f 6e | 74 46 61 6d 20 6f 6c 64 |etSysFon|tFam old|
|00000860| 46 6f 6e 74 18 4c 4d 53 | 65 74 53 79 73 46 6f 6e |Font.LMS|etSysFon|
|00000870| 74 53 69 7a 65 20 6f 6c | 64 53 69 7a 65 13 4c 4d |tSize ol|dSize.LM|
|00000880| 53 65 74 4c 61 73 74 53 | 50 45 78 74 72 61 20 2d |SetLastS|PExtra -|
|00000890| 31 0c 49 6e 76 61 6c 4d | 65 6e 75 42 61 72 03 65 |1.InvalM|enuBar.e|
|000008a0| 6e 64 00 14 44 65 6c 65 | 74 65 4d 65 6e 75 20 6d |nd..Dele|teMenu m|
|000008b0| 65 2e 4d 65 6e 75 49 44 | 00 21 4e 65 77 49 6e 64 |e.MenuID|.!NewInd|
|000008c0| 65 78 20 3d 20 42 69 74 | 77 69 73 65 41 6e 64 28 |ex = Bit|wiseAnd(|
|000008d0| 52 65 73 75 6c 74 2c 32 | 35 35 29 15 69 66 20 4e |Result,2|55).if N|
|000008e0| 65 77 49 6e 64 65 78 20 | 3c 3e 20 30 20 74 68 65 |ewIndex |<> 0 the|
|000008f0| 6e 18 6d 65 2e 50 4c 69 | 73 74 49 6e 64 65 78 20 |n.me.PLi|stIndex |
|00000900| 3d 20 4e 65 77 49 6e 64 | 65 78 08 43 68 61 6e 67 |= NewInd|ex.Chang|
|00000910| 65 28 29 03 65 6e 64 03 | 65 6e 64 07 45 6e 64 20 |e().end.|end.End |
|00000920| 53 75 62 06 41 64 64 52 | 6f 77 0e 74 65 78 74 20 |Sub.AddR|ow.text |
|00000930| 61 73 20 73 74 72 69 6e | 67 00 00 01 07 01 07 03 |as strin|g.......|
|00000940| 1a 53 75 62 20 41 64 64 | 52 6f 77 28 74 65 78 74 |.Sub Add|Row(text|
|00000950| 20 61 73 20 73 74 72 69 | 6e 67 29 21 6d 65 2e 49 | as stri|ng)!me.I|
|00000960| 6e 73 65 72 74 52 6f 77 | 28 6d 65 2e 4c 69 73 74 |nsertRow|(me.List|
|00000970| 43 6f 75 6e 74 28 29 2c | 74 65 78 74 29 07 45 6e |Count(),|text).En|
|00000980| 64 20 53 75 62 09 4c 69 | 73 74 43 6f 75 6e 74 00 |d Sub.Li|stCount.|
|00000990| 07 69 6e 74 65 67 65 72 | 00 03 21 03 21 06 1f 46 |.integer|..!.!..F|
|000009a0| 75 6e 63 74 69 6f 6e 20 | 4c 69 73 74 43 6f 75 6e |unction |ListCoun|
|000009b0| 74 28 29 20 41 73 20 69 | 6e 74 65 67 65 72 16 69 |t() As i|nteger.i|
|000009c0| 66 20 6d 65 2e 50 4d 65 | 6e 75 48 56 61 6c 69 64 |f me.PMe|nuHValid|
|000009d0| 20 74 68 65 6e 8f 01 64 | 65 63 6c 61 72 65 20 66 | then..d|eclare f|
|000009e0| 75 6e 63 74 69 6f 6e 20 | 43 6f 75 6e 74 4d 49 74 |unction |CountMIt|
|000009f0| 65 6d 73 20 6c 69 62 20 | 22 49 6e 74 65 72 66 61 |ems lib |"Interfa|
|00000a00| 63 65 4c 69 62 22 20 28 | 74 68 65 4d 65 6e 75 20 |ceLib" (|theMenu |
|00000a10| 61 73 20 69 6e 74 65 67 | 65 72 29 20 61 73 20 69 |as integ|er) as i|
|00000a20| 6e 74 65 67 65 72 22 72 | 65 74 75 72 6e 20 43 6f |nteger"r|eturn Co|
|00000a30| 75 6e 74 4d 49 74 65 6d | 73 28 6d 65 2e 50 4d 65 |untMItem|s(me.PMe|
|00000a40| 6e 75 48 61 6e 64 6c 65 | 29 03 65 6e 64 0c 45 6e |nuHandle|).end.En|
|00000a50| 64 20 46 75 6e 63 74 69 | 6f 6e 04 4c 69 73 74 0c |d Functi|on.List.|
|00000a60| 6e 20 61 73 20 69 6e 74 | 65 67 65 72 06 73 74 72 |n as int|eger.str|
|00000a70| 69 6e 67 00 0d 03 0d 03 | 0f 25 46 75 6e 63 74 69 |ing.....|.%Functi|
|00000a80| 6f 6e 20 4c 69 73 74 28 | 6e 20 61 73 20 69 6e 74 |on List(|n as int|
|00000a90| 65 67 65 72 29 20 41 73 | 20 73 74 72 69 6e 67 1c |eger) As| string.|
|00000aa0| 64 69 6d 20 4c 69 73 74 | 45 6e 74 72 79 20 61 73 |dim List|Entry as|
|00000ab0| 20 4d 65 6d 6f 72 79 42 | 6c 6f 63 6b 00 1f 4c 69 | MemoryB|lock..Li|
|00000ac0| 73 74 45 6e 74 72 79 20 | 3d 20 4e 65 77 4d 65 6d |stEntry |= NewMem|
|00000ad0| 6f 72 79 42 6c 6f 63 6b | 28 32 35 36 29 00 16 69 |oryBlock|(256)..i|
|00000ae0| 66 20 6d 65 2e 50 4d 65 | 6e 75 48 56 61 6c 69 64 |f me.PMe|nuHValid|
|00000af0| 20 74 68 65 6e 1a 69 66 | 20 6e 20 3e 20 6d 65 2e | then.if| n > me.|
|00000b00| 4c 69 73 74 43 6f 75 6e | 74 28 29 20 74 68 65 6e |ListCoun|t() then|
|00000b10| 1e 72 61 69 73 65 20 6e | 65 77 20 4f 75 74 4f 66 |.raise n|ew OutOf|
|00000b20| 42 6f 75 6e 64 73 45 78 | 63 65 70 74 69 6f 6e 04 |BoundsEx|ception.|
|00000b30| 65 6c 73 65 a7 01 64 65 | 63 6c 61 72 65 20 73 75 |else..de|clare su|
|00000b40| 62 20 47 65 74 4d 65 6e | 75 49 74 65 6d 54 65 78 |b GetMen|uItemTex|
|00000b50| 74 20 6c 69 62 20 22 49 | 6e 74 65 72 66 61 63 65 |t lib "I|nterface|
|00000b60| 4c 69 62 22 20 28 74 68 | 65 4d 65 6e 75 20 61 73 |Lib" (th|eMenu as|
|00000b70| 20 69 6e 74 65 67 65 72 | 2c 20 69 74 65 6d 20 61 | integer|, item a|
|00000b80| 73 20 69 6e 74 65 67 65 | 72 2c 20 69 74 65 6d 53 |s intege|r, itemS|
|00000b90| 74 72 69 6e 67 20 61 73 | 20 70 74 72 29 2a 47 65 |tring as| ptr)*Ge|
|00000ba0| 74 4d 65 6e 75 49 74 65 | 6d 54 65 78 74 20 6d 65 |tMenuIte|mText me|
|00000bb0| 2e 50 4d 65 6e 75 48 61 | 6e 64 6c 65 2c 6e 2c 4c |.PMenuHa|ndle,n,L|
|00000bc0| 69 73 74 45 6e 74 72 79 | 1b 72 65 74 75 72 6e 20 |istEntry|.return |
|00000bd0| 4c 69 73 74 45 6e 74 72 | 79 2e 70 73 74 72 69 6e |ListEntr|y.pstrin|
|00000be0| 67 28 30 29 03 65 6e 64 | 03 65 6e 64 0c 45 6e 64 |g(0).end|.end.End|
|00000bf0| 20 46 75 6e 63 74 69 6f | 6e 09 52 65 6d 6f 76 65 | Functio|n.Remove|
|00000c00| 52 6f 77 11 72 6f 77 4e | 75 6d 20 61 73 20 69 6e |Row.rowN|um as in|
|00000c10| 74 65 67 65 72 00 00 06 | 1d 06 1d 0a 20 53 75 62 |teger...|.... Sub|
|00000c20| 20 52 65 6d 6f 76 65 52 | 6f 77 28 72 6f 77 4e 75 | RemoveR|ow(rowNu|
|00000c30| 6d 20 61 73 20 69 6e 74 | 65 67 65 72 29 16 69 66 |m as int|eger).if|
|00000c40| 20 6d 65 2e 50 4d 65 6e | 75 48 56 61 6c 69 64 20 | me.PMen|uHValid |
|00000c50| 74 68 65 6e 92 01 64 65 | 63 6c 61 72 65 20 73 75 |then..de|clare su|
|00000c60| 62 20 44 65 6c 65 74 65 | 4d 65 6e 75 49 74 65 6d |b Delete|MenuItem|
|00000c70| 20 6c 69 62 20 22 49 6e | 74 65 72 66 61 63 65 4c | lib "In|terfaceL|
|00000c80| 69 62 22 20 28 74 68 65 | 4d 65 6e 75 20 61 73 20 |ib" (the|Menu as |
|00000c90| 69 6e 74 65 67 65 72 2c | 69 74 65 6d 20 61 73 20 |integer,|item as |
|00000ca0| 69 6e 74 65 67 65 72 29 | 1f 69 66 20 72 6f 77 4e |integer)|.if rowN|
|00000cb0| 75 6d 20 3e 20 6d 65 2e | 4c 69 73 74 43 6f 75 6e |um > me.|ListCoun|
|00000cc0| 74 28 29 20 74 68 65 6e | 1e 72 61 69 73 65 20 6e |t() then|.raise n|
|00000cd0| 65 77 20 4f 75 74 4f 66 | 42 6f 75 6e 64 73 45 78 |ew OutOf|BoundsEx|
|00000ce0| 63 65 70 74 69 6f 6e 04 | 65 6c 73 65 24 44 65 6c |ception.|else$Del|
|00000cf0| 65 74 65 4d 65 6e 75 49 | 74 65 6d 20 6d 65 2e 50 |eteMenuI|tem me.P|
|00000d00| 4d 65 6e 75 48 61 6e 64 | 6c 65 2c 72 6f 77 4e 75 |MenuHand|le,rowNu|
|00000d10| 6d 03 65 6e 64 03 65 6e | 64 07 45 6e 64 20 53 75 |m.end.en|d.End Su|
|00000d20| 62 07 50 44 61 72 6b 65 | 6e 0a 63 20 61 73 20 63 |b.PDarke|n.c as c|
|00000d30| 6f 6c 6f 72 05 63 6f 6c | 6f 72 01 01 00 01 00 03 |olor.col|or......|
|00000d40| 25 46 75 6e 63 74 69 6f | 6e 20 50 44 61 72 6b 65 |%Functio|n PDarke|
|00000d50| 6e 28 63 20 61 73 20 63 | 6f 6c 6f 72 29 20 41 73 |n(c as c|olor) As|
|00000d60| 20 63 6f 6c 6f 72 2f 72 | 65 74 75 72 6e 20 52 47 | color/r|eturn RG|
|00000d70| 42 28 63 2e 72 65 64 20 | 2d 20 33 30 2c 63 2e 67 |B(c.red |- 30,c.g|
|00000d80| 72 65 65 6e 20 2d 20 33 | 30 2c 63 2e 62 6c 75 65 |reen - 3|0,c.blue|
|00000d90| 20 2d 20 33 30 29 0c 45 | 6e 64 20 46 75 6e 63 74 | - 30).E|nd Funct|
|00000da0| 69 6f 6e 0c 41 64 64 53 | 65 70 61 72 61 74 6f 72 |ion.AddS|eparator|
|00000db0| 00 00 00 01 0e 01 0e 03 | 12 53 75 62 20 41 64 64 |........|.Sub Add|
|00000dc0| 53 65 70 61 72 61 74 6f | 72 28 29 0e 6d 65 2e 41 |Separato|r().me.A|
|00000dd0| 64 64 52 6f 77 28 22 2d | 22 29 07 45 6e 64 20 53 |ddRow("-|").End S|
|00000de0| 75 62 0d 44 65 6c 65 74 | 65 41 6c 6c 52 6f 77 73 |ub.Delet|eAllRows|
|00000df0| 00 00 00 03 0f 03 0f 06 | 13 53 75 62 20 44 65 6c |........|.Sub Del|
|00000e00| 65 74 65 41 6c 6c 52 6f | 77 73 28 29 10 64 69 6d |eteAllRo|ws().dim|
|00000e10| 20 69 20 61 73 20 69 6e | 74 65 67 65 72 1b 66 6f | i as in|teger.fo|
|00000e20| 72 20 69 20 3d 20 31 20 | 74 6f 20 6d 65 2e 4c 69 |r i = 1 |to me.Li|
|00000e30| 73 74 43 6f 75 6e 74 28 | 29 0f 6d 65 2e 52 65 6d |stCount(|).me.Rem|
|00000e40| 6f 76 65 52 6f 77 28 69 | 29 04 6e 65 78 74 07 45 |oveRow(i|).next.E|
|00000e50| 6e 64 20 53 75 62 09 49 | 6e 73 65 72 74 52 6f 77 |nd Sub.I|nsertRow|
|00000e60| 1f 77 68 65 72 65 20 61 | 73 20 69 6e 74 65 67 65 |.where a|s intege|
|00000e70| 72 2c 74 65 78 74 20 61 | 73 20 73 74 72 69 6e 67 |r,text a|s string|
|00000e80| 00 00 03 1d 03 1d 08 2e | 53 75 62 20 49 6e 73 65 |........|Sub Inse|
|00000e90| 72 74 52 6f 77 28 77 68 | 65 72 65 20 61 73 20 69 |rtRow(wh|ere as i|
|00000ea0| 6e 74 65 67 65 72 2c 74 | 65 78 74 20 61 73 20 73 |nteger,t|ext as s|
|00000eb0| 74 72 69 6e 67 29 16 69 | 66 20 6d 65 2e 50 4d 65 |tring).i|f me.PMe|
|00000ec0| 6e 75 48 56 61 6c 69 64 | 20 74 68 65 6e ab 01 64 |nuHValid| then..d|
|00000ed0| 65 63 6c 61 72 65 20 73 | 75 62 20 49 6e 73 65 72 |eclare s|ub Inser|
|00000ee0| 74 4d 65 6e 75 49 74 65 | 6d 20 6c 69 62 20 22 49 |tMenuIte|m lib "I|
|00000ef0| 6e 74 65 72 66 61 63 65 | 4c 69 62 22 20 28 74 68 |nterface|Lib" (th|
|00000f00| 65 4d 65 6e 75 20 61 73 | 20 69 6e 74 65 67 65 72 |eMenu as| integer|
|00000f10| 2c 69 74 65 6d 53 74 72 | 69 6e 67 20 61 73 20 50 |,itemStr|ing as P|
|00000f20| 53 74 72 69 6e 67 2c 61 | 66 74 65 72 49 74 65 6d |String,a|fterItem|
|00000f30| 20 61 73 20 73 68 6f 72 | 74 29 28 49 6e 73 65 72 | as shor|t)(Inser|
|00000f40| 74 4d 65 6e 75 49 74 65 | 6d 20 6d 65 2e 50 4d 65 |tMenuIte|m me.PMe|
|00000f50| 6e 75 48 61 6e 64 6c 65 | 2c 74 65 78 74 2c 77 68 |nuHandle|,text,wh|
|00000f60| 65 72 65 04 65 6c 73 65 | 04 62 65 65 70 03 65 6e |ere.else|.beep.en|
|00000f70| 64 07 45 6e 64 20 53 75 | 62 04 54 65 78 74 00 06 |d.End Su|b.Text..|
|00000f80| 73 74 72 69 6e 67 00 01 | 00 01 00 03 19 46 75 6e |string..|.....Fun|
|00000f90| 63 74 69 6f 6e 20 54 65 | 78 74 28 29 20 41 73 20 |ction Te|xt() As |
|00000fa0| 73 74 72 69 6e 67 1c 72 | 65 74 75 72 6e 20 6d 65 |string.r|eturn me|
|00000fb0| 2e 4c 69 73 74 28 6d 65 | 2e 4c 69 73 74 69 6e 64 |.List(me|.Listind|
|00000fc0| 65 78 29 0c 45 6e 64 20 | 46 75 6e 63 74 69 6f 6e |ex).End |Function|
|00000fd0| 09 4c 69 73 74 49 6e 64 | 65 78 00 07 69 6e 74 65 |.ListInd|ex..inte|
|00000fe0| 67 65 72 00 01 0c 01 0c | 03 1f 46 75 6e 63 74 69 |ger.....|..Functi|
|00000ff0| 6f 6e 20 4c 69 73 74 49 | 6e 64 65 78 28 29 20 41 |on ListI|ndex() A|
|00001000| 73 20 69 6e 74 65 67 65 | 72 14 72 65 74 75 72 6e |s intege|r.return|
|00001010| 20 6d 65 2e 50 4c 69 73 | 74 49 6e 64 65 78 0c 45 | me.PLis|tIndex.E|
|00001020| 6e 64 20 46 75 6e 63 74 | 69 6f 6e 07 53 65 74 54 |nd Funct|ion.SetT|
|00001030| 65 78 74 0e 74 65 78 74 | 20 61 73 20 73 74 72 69 |ext.text| as stri|
|00001040| 6e 67 00 00 02 01 02 01 | 04 1b 53 75 62 20 53 65 |ng......|..Sub Se|
|00001050| 74 54 65 78 74 28 74 65 | 78 74 20 61 73 20 73 74 |tText(te|xt as st|
|00001060| 72 69 6e 67 29 1f 6d 65 | 2e 53 65 74 4c 69 73 74 |ring).me|.SetList|
|00001070| 28 6d 65 2e 4c 69 73 74 | 49 6e 64 65 78 28 29 2c |(me.List|Index(),|
|00001080| 74 65 78 74 29 15 27 6d | 65 2e 50 52 65 6e 64 65 |text).'m|e.PRende|
|00001090| 72 43 6f 6e 74 72 6f 6c | 28 30 29 07 45 6e 64 20 |rControl|(0).End |
|000010a0| 53 75 62 07 53 65 74 4c | 69 73 74 1f 69 74 65 6d |Sub.SetL|ist.item|
|000010b0| 20 61 73 20 69 6e 74 65 | 67 65 72 2c 20 74 65 78 | as inte|ger, tex|
|000010c0| 74 20 61 73 20 73 74 72 | 69 6e 67 00 00 03 1e 03 |t as str|ing.....|
|000010d0| 1e 06 2c 53 75 62 20 53 | 65 74 4c 69 73 74 28 69 |..,Sub S|etList(i|
|000010e0| 74 65 6d 20 61 73 20 69 | 6e 74 65 67 65 72 2c 20 |tem as i|nteger, |
|000010f0| 74 65 78 74 20 61 73 20 | 73 74 72 69 6e 67 29 16 |text as |string).|
|00001100| 69 66 20 6d 65 2e 50 4d | 65 6e 75 48 56 61 6c 69 |if me.PM|enuHVali|
|00001110| 64 20 74 68 65 6e a8 01 | 64 65 63 6c 61 72 65 20 |d then..|declare |
|00001120| 73 75 62 20 53 65 74 4d | 65 6e 75 49 74 65 6d 54 |sub SetM|enuItemT|
|00001130| 65 78 74 20 6c 69 62 20 | 22 49 6e 74 65 72 66 61 |ext lib |"Interfa|
|00001140| 63 65 4c 69 62 22 20 28 | 74 68 65 4d 65 6e 75 20 |ceLib" (|theMenu |
|00001150| 61 73 20 69 6e 74 65 67 | 65 72 2c 69 74 65 6d 20 |as integ|er,item |
|00001160| 61 73 20 69 6e 74 65 67 | 65 72 2c 53 74 72 69 6e |as integ|er,Strin|
|00001170| 67 50 74 72 20 61 73 20 | 50 53 74 72 69 6e 67 29 |gPtr as |PString)|
|00001180| 28 53 65 74 4d 65 6e 75 | 49 74 65 6d 54 65 78 74 |(SetMenu|ItemText|
|00001190| 20 6d 65 2e 50 4d 65 6e | 75 48 61 6e 64 6c 65 2c | me.PMen|uHandle,|
|000011a0| 69 74 65 6d 2c 74 65 78 | 74 03 65 6e 64 07 45 6e |item,tex|t.end.En|
|000011b0| 64 20 53 75 62 0c 53 65 | 74 4c 69 73 74 49 6e 64 |d Sub.Se|tListInd|
|000011c0| 65 78 0c 6e 20 61 73 20 | 69 6e 74 65 67 65 72 00 |ex.n as |integer.|
|000011d0| 00 02 01 02 01 04 1e 53 | 75 62 20 53 65 74 4c 69 |.......S|ub SetLi|
|000011e0| 73 74 49 6e 64 65 78 28 | 6e 20 61 73 20 69 6e 74 |stIndex(|n as int|
|000011f0| 65 67 65 72 29 11 6d 65 | 2e 50 4c 69 73 74 49 6e |eger).me|.PListIn|
|00001200| 64 65 78 20 3d 20 6e 15 | 27 6d 65 2e 50 52 65 6e |dex = n.|'me.PRen|
|00001210| 64 65 72 43 6f 6e 74 72 | 6f 6c 28 30 29 07 45 6e |derContr|ol(0).En|
|00001220| 64 20 53 75 62 10 50 47 | 65 74 55 6e 69 71 75 65 |d Sub.PG|etUnique|
|00001230| 4d 65 6e 75 49 44 00 07 | 69 6e 74 65 67 65 72 00 |MenuID..|integer.|
|00001240| 0f 04 0f 04 11 26 46 75 | 6e 63 74 69 6f 6e 20 50 |.....&Fu|nction P|
|00001250| 47 65 74 55 6e 69 71 75 | 65 4d 65 6e 75 49 44 28 |GetUniqu|eMenuID(|
|00001260| 29 20 41 73 20 69 6e 74 | 65 67 65 72 11 64 69 6d |) As int|eger.dim|
|00001270| 20 69 64 20 61 73 20 69 | 6e 74 65 67 65 72 14 64 | id as i|nteger.d|
|00001280| 69 6d 20 68 4d 65 6e 75 | 20 61 73 20 69 6e 74 65 |im hMenu| as inte|
|00001290| 67 65 72 00 a0 01 64 65 | 63 6c 61 72 65 20 66 75 |ger...de|clare fu|
|000012a0| 6e 63 74 69 6f 6e 20 47 | 65 74 4d 65 6e 75 48 61 |nction G|etMenuHa|
|000012b0| 6e 64 6c 65 20 4c 69 62 | 20 22 49 6e 74 65 72 66 |ndle Lib| "Interf|
|000012c0| 61 63 65 4c 69 62 22 20 | 28 6d 65 6e 75 49 44 20 |aceLib" |(menuID |
|000012d0| 61 73 20 53 68 6f 72 74 | 29 20 61 73 20 49 6e 74 |as Short|) as Int|
|000012e0| 65 67 65 72 20 49 6e 6c | 69 6e 65 36 38 4b 28 22 |eger Inl|ine68K("|
|000012f0| 41 39 34 39 22 29 00 09 | 69 64 20 3d 20 31 30 30 |A949")..|id = 100|
|00001300| 30 00 0a 77 68 69 6c 65 | 20 74 72 75 65 19 68 4d |0..while| true.hM|
|00001310| 65 6e 75 20 3d 20 47 65 | 74 4d 65 6e 75 48 61 6e |enu = Ge|tMenuHan|
|00001320| 64 6c 65 28 69 64 29 11 | 69 66 20 68 4d 65 6e 75 |dle(id).|if hMenu|
|00001330| 20 3d 20 30 20 74 68 65 | 6e 09 72 65 74 75 72 6e | = 0 the|n.return|
|00001340| 20 69 64 04 65 6c 73 65 | 0b 69 64 20 3d 20 69 64 | id.else|.id = id|
|00001350| 20 2b 20 31 03 65 6e 64 | 04 77 65 6e 64 0c 45 6e | + 1.end|.wend.En|
|00001360| 64 20 46 75 6e 63 74 69 | 6f 6e 09 45 6e 61 62 6c |d Functi|on.Enabl|
|00001370| 65 52 6f 77 10 69 6e 64 | 65 78 20 61 73 20 69 6e |eRow.ind|ex as in|
|00001380| 74 65 67 65 72 00 00 06 | 10 06 10 0a 1f 53 75 62 |teger...|.....Sub|
|00001390| 20 45 6e 61 62 6c 65 52 | 6f 77 28 69 6e 64 65 78 | EnableR|ow(index|
|000013a0| 20 61 73 20 69 6e 74 65 | 67 65 72 29 16 69 66 20 | as inte|ger).if |
|000013b0| 6d 65 2e 50 4d 65 6e 75 | 48 56 61 6c 69 64 20 74 |me.PMenu|HValid t|
|000013c0| 68 65 6e 8e 01 64 65 63 | 6c 61 72 65 20 73 75 62 |hen..dec|lare sub|
|000013d0| 20 45 6e 61 62 6c 65 49 | 74 65 6d 20 6c 69 62 20 | EnableI|tem lib |
|000013e0| 22 49 6e 74 65 72 66 61 | 63 65 4c 69 62 22 20 28 |"Interfa|ceLib" (|
|000013f0| 74 68 65 4d 65 6e 75 20 | 61 73 20 69 6e 74 65 67 |theMenu |as integ|
|00001400| 65 72 2c 69 74 65 6d 20 | 61 73 20 69 6e 74 65 67 |er,item |as integ|
|00001410| 65 72 29 1e 69 66 20 69 | 6e 64 65 78 20 3e 20 6d |er).if i|ndex > m|
|00001420| 65 2e 4c 69 73 74 43 6f | 75 6e 74 28 29 20 74 68 |e.ListCo|unt() th|
|00001430| 65 6e 1e 72 61 69 73 65 | 20 6e 65 77 20 6f 75 74 |en.raise| new out|
|00001440| 4f 66 42 6f 75 6e 64 73 | 45 78 63 65 70 74 69 6f |OfBounds|Exceptio|
|00001450| 6e 04 65 6c 73 65 1f 45 | 6e 61 62 6c 65 49 74 65 |n.else.E|nableIte|
|00001460| 6d 20 6d 65 2e 50 4d 65 | 6e 75 48 61 6e 64 6c 65 |m me.PMe|nuHandle|
|00001470| 2c 69 6e 64 65 78 03 65 | 6e 64 03 65 6e 64 07 45 |,index.e|nd.end.E|
|00001480| 6e 64 20 53 75 62 0a 44 | 69 73 61 62 6c 65 52 6f |nd Sub.D|isableRo|
|00001490| 77 10 69 6e 64 65 78 20 | 61 73 20 69 6e 74 65 67 |w.index |as integ|
|000014a0| 65 72 00 00 06 03 06 03 | 0a 20 53 75 62 20 44 69 |er......|. Sub Di|
|000014b0| 73 61 62 6c 65 52 6f 77 | 28 69 6e 64 65 78 20 61 |sableRow|(index a|
|000014c0| 73 20 69 6e 74 65 67 65 | 72 29 16 69 66 20 6d 65 |s intege|r).if me|
|000014d0| 2e 50 4d 65 6e 75 48 56 | 61 6c 69 64 20 74 68 65 |.PMenuHV|alid the|
|000014e0| 6e 8f 01 64 65 63 6c 61 | 72 65 20 73 75 62 20 44 |n..decla|re sub D|
|000014f0| 69 73 61 62 6c 65 49 74 | 65 6d 20 6c 69 62 20 22 |isableIt|em lib "|
|00001500| 49 6e 74 65 72 66 61 63 | 65 4c 69 62 22 20 28 74 |Interfac|eLib" (t|
|00001510| 68 65 4d 65 6e 75 20 61 | 73 20 69 6e 74 65 67 65 |heMenu a|s intege|
|00001520| 72 2c 69 74 65 6d 20 61 | 73 20 69 6e 74 65 67 65 |r,item a|s intege|
|00001530| 72 29 1e 69 66 20 69 6e | 64 65 78 20 3e 20 6d 65 |r).if in|dex > me|
|00001540| 2e 4c 69 73 74 43 6f 75 | 6e 74 28 29 20 74 68 65 |.ListCou|nt() the|
|00001550| 6e 1e 72 61 69 73 65 20 | 6e 65 77 20 6f 75 74 4f |n.raise |new outO|
|00001560| 66 42 6f 75 6e 64 73 45 | 78 63 65 70 74 69 6f 6e |fBoundsE|xception|
|00001570| 04 65 6c 73 65 20 44 69 | 73 61 62 6c 65 49 74 65 |.else Di|sableIte|
|00001580| 6d 20 6d 65 2e 50 4d 65 | 6e 75 48 61 6e 64 6c 65 |m me.PMe|nuHandle|
|00001590| 2c 69 6e 64 65 78 03 65 | 6e 64 03 65 6e 64 07 45 |,index.e|nd.end.E|
|000015a0| 6e 64 20 53 75 62 08 43 | 68 65 63 6b 52 6f 77 23 |nd Sub.C|heckRow#|
|000015b0| 69 74 65 6d 20 61 73 20 | 69 6e 74 65 67 65 72 2c |item as |integer,|
|000015c0| 20 63 68 65 63 6b 65 64 | 20 61 73 20 62 6f 6f 6c | checked| as bool|
|000015d0| 65 61 6e 00 00 06 18 06 | 18 0a 31 53 75 62 20 43 |ean.....|..1Sub C|
|000015e0| 68 65 63 6b 52 6f 77 28 | 69 74 65 6d 20 61 73 20 |heckRow(|item as |
|000015f0| 69 6e 74 65 67 65 72 2c | 20 63 68 65 63 6b 65 64 |integer,| checked|
|00001600| 20 61 73 20 62 6f 6f 6c | 65 61 6e 29 16 69 66 20 | as bool|ean).if |
|00001610| 6d 65 2e 50 4d 65 6e 75 | 48 56 61 6c 69 64 20 74 |me.PMenu|HValid t|
|00001620| 68 65 6e 9e 01 64 65 63 | 6c 61 72 65 20 73 75 62 |hen..dec|lare sub|
|00001630| 20 43 68 65 63 6b 49 74 | 65 6d 20 6c 69 62 20 22 | CheckIt|em lib "|
|00001640| 49 6e 74 65 72 66 61 63 | 65 4c 69 62 22 20 28 74 |Interfac|eLib" (t|
|00001650| 68 65 4d 65 6e 75 20 61 | 73 20 69 6e 74 65 67 65 |heMenu a|s intege|
|00001660| 72 2c 69 74 65 6d 20 61 | 73 20 69 6e 74 65 67 65 |r,item a|s intege|
|00001670| 72 2c 63 68 65 63 6b 20 | 61 73 20 62 6f 6f 6c 65 |r,check |as boole|
|00001680| 61 6e 29 1d 69 66 20 69 | 74 65 6d 20 3e 20 6d 65 |an).if i|tem > me|
|00001690| 2e 4c 69 73 74 43 6f 75 | 6e 74 28 29 20 74 68 65 |.ListCou|nt() the|
|000016a0| 6e 1e 72 61 69 73 65 20 | 6e 65 77 20 6f 75 74 4f |n.raise |new outO|
|000016b0| 66 42 6f 75 6e 64 73 45 | 78 63 65 70 74 69 6f 6e |fBoundsE|xception|
|000016c0| 04 65 6c 73 65 25 43 68 | 65 63 6b 49 74 65 6d 20 |.else%Ch|eckItem |
|000016d0| 6d 65 2e 50 4d 65 6e 75 | 48 61 6e 64 6c 65 2c 69 |me.PMenu|Handle,i|
|000016e0| 74 65 6d 2c 63 68 65 63 | 6b 65 64 03 65 6e 64 03 |tem,chec|ked.end.|
|000016f0| 65 6e 64 07 45 6e 64 20 | 53 75 62 0a 53 65 74 52 |end.End |Sub.SetR|
|00001700| 6f 77 42 6f 6c 64 1f 72 | 6f 77 20 61 73 20 69 6e |owBold.r|ow as in|
|00001710| 74 65 67 65 72 2c 20 62 | 6f 6c 64 20 61 73 20 62 |teger, b|old as b|
|00001720| 6f 6f 6c 65 61 6e 00 00 | 16 01 16 01 18 2f 53 75 |oolean..|...../Su|
|00001730| 62 20 53 65 74 52 6f 77 | 42 6f 6c 64 28 72 6f 77 |b SetRow|Bold(row|
|00001740| 20 61 73 20 69 6e 74 65 | 67 65 72 2c 20 62 6f 6c | as inte|ger, bol|
|00001750| 64 20 61 73 20 62 6f 6f | 6c 65 61 6e 29 15 64 69 |d as boo|lean).di|
|00001760| 6d 20 53 74 79 6c 65 4e | 20 61 73 20 69 6e 74 65 |m StyleN| as inte|
|00001770| 67 65 72 00 16 69 66 20 | 6d 65 2e 50 4d 65 6e 75 |ger..if |me.PMenu|
|00001780| 48 56 61 6c 69 64 20 74 | 68 65 6e a3 01 64 65 63 |HValid t|hen..dec|
|00001790| 6c 61 72 65 20 73 75 62 | 20 53 65 74 49 74 65 6d |lare sub| SetItem|
|000017a0| 53 74 79 6c 65 20 6c 69 | 62 20 22 49 6e 74 65 72 |Style li|b "Inter|
|000017b0| 66 61 63 65 4c 69 62 22 | 20 28 74 68 65 4d 65 6e |faceLib"| (theMen|
|000017c0| 75 20 61 73 20 69 6e 74 | 65 67 65 72 2c 20 69 74 |u as int|eger, it|
|000017d0| 65 6d 20 61 73 20 69 6e | 74 65 67 65 72 2c 20 73 |em as in|teger, s|
|000017e0| 74 79 6c 65 20 61 73 20 | 69 6e 74 65 67 65 72 29 |tyle as |integer)|
|000017f0| 1c 69 66 20 72 6f 77 20 | 3e 20 6d 65 2e 4c 69 73 |.if row |> me.Lis|
|00001800| 74 43 6f 75 6e 74 28 29 | 20 74 68 65 6e 1e 72 61 |tCount()| then.ra|
|00001810| 69 73 65 20 6e 65 77 20 | 6f 75 74 4f 66 42 6f 75 |ise new |outOfBou|
|00001820| 6e 64 73 45 78 63 65 70 | 74 69 6f 6e 04 65 6c 73 |ndsExcep|tion.els|
|00001830| 65 1e 53 74 79 6c 65 4e | 20 3d 20 6d 65 2e 50 47 |e.StyleN| = me.PG|
|00001840| 65 74 49 74 65 6d 53 74 | 79 6c 65 28 72 6f 77 29 |etItemSt|yle(row)|
|00001850| 20 69 66 20 42 69 74 77 | 69 73 65 41 4e 44 28 31 | if Bitw|iseAND(1|
|00001860| 2c 53 74 79 6c 65 4e 29 | 20 3d 20 31 20 74 68 65 |,StyleN)| = 1 the|
|00001870| 6e 10 69 66 20 6e 6f 74 | 20 62 6f 6c 64 20 74 68 |n.if not| bold th|
|00001880| 65 6e 13 53 74 79 6c 65 | 4e 20 3d 20 53 74 79 6c |en.Style|N = Styl|
|00001890| 65 4e 20 2d 20 31 03 65 | 6e 64 04 65 6c 73 65 0c |eN - 1.e|nd.else.|
|000018a0| 69 66 20 62 6f 6c 64 20 | 74 68 65 6e 13 53 74 79 |if bold |then.Sty|
|000018b0| 6c 65 4e 20 3d 20 53 74 | 79 6c 65 4e 20 2b 20 31 |leN = St|yleN + 1|
|000018c0| 03 65 6e 64 03 65 6e 64 | 26 53 65 74 49 74 65 6d |.end.end|&SetItem|
|000018d0| 53 74 79 6c 65 20 6d 65 | 2e 50 4d 65 6e 75 48 61 |Style me|.PMenuHa|
|000018e0| 6e 64 6c 65 2c 72 6f 77 | 2c 53 74 79 6c 65 4e 03 |ndle,row|,StyleN.|
|000018f0| 65 6e 64 03 65 6e 64 00 | 15 27 6d 65 2e 50 52 65 |end.end.|.'me.PRe|
|00001900| 6e 64 65 72 43 6f 6e 74 | 72 6f 6c 28 30 29 07 45 |nderCont|rol(0).E|
|00001910| 6e 64 20 53 75 62 0c 53 | 65 74 52 6f 77 49 74 61 |nd Sub.S|etRowIta|
|00001920| 6c 69 63 21 72 6f 77 20 | 61 73 20 69 6e 74 65 67 |lic!row |as integ|
|00001930| 65 72 2c 20 69 74 61 6c | 69 63 20 61 73 20 62 6f |er, ital|ic as bo|
|00001940| 6f 6c 65 61 6e 00 00 16 | 01 16 01 18 33 53 75 62 |olean...|....3Sub|
|00001950| 20 53 65 74 52 6f 77 49 | 74 61 6c 69 63 28 72 6f | SetRowI|talic(ro|
|00001960| 77 20 61 73 20 69 6e 74 | 65 67 65 72 2c 20 69 74 |w as int|eger, it|
|00001970| 61 6c 69 63 20 61 73 20 | 62 6f 6f 6c 65 61 6e 29 |alic as |boolean)|
|00001980| 15 64 69 6d 20 53 74 79 | 6c 65 4e 20 61 73 20 69 |.dim Sty|leN as i|
|00001990| 6e 74 65 67 65 72 00 16 | 69 66 20 6d 65 2e 50 4d |nteger..|if me.PM|
|000019a0| 65 6e 75 48 56 61 6c 69 | 64 20 74 68 65 6e a3 01 |enuHVali|d then..|
|000019b0| 64 65 63 6c 61 72 65 20 | 73 75 62 20 53 65 74 49 |declare |sub SetI|
|000019c0| 74 65 6d 53 74 79 6c 65 | 20 6c 69 62 20 22 49 6e |temStyle| lib "In|
|000019d0| 74 65 72 66 61 63 65 4c | 69 62 22 20 28 74 68 65 |terfaceL|ib" (the|
|000019e0| 4d 65 6e 75 20 61 73 20 | 69 6e 74 65 67 65 72 2c |Menu as |integer,|
|000019f0| 20 69 74 65 6d 20 61 73 | 20 69 6e 74 65 67 65 72 | item as| integer|
|00001a00| 2c 20 73 74 79 6c 65 20 | 61 73 20 69 6e 74 65 67 |, style |as integ|
|00001a10| 65 72 29 1c 69 66 20 72 | 6f 77 20 3e 20 6d 65 2e |er).if r|ow > me.|
|00001a20| 4c 69 73 74 43 6f 75 6e | 74 28 29 20 74 68 65 6e |ListCoun|t() then|
|00001a30| 1e 72 61 69 73 65 20 6e | 65 77 20 6f 75 74 4f 66 |.raise n|ew outOf|
|00001a40| 42 6f 75 6e 64 73 45 78 | 63 65 70 74 69 6f 6e 04 |BoundsEx|ception.|
|00001a50| 65 6c 73 65 1e 53 74 79 | 6c 65 4e 20 3d 20 6d 65 |else.Sty|leN = me|
|00001a60| 2e 50 47 65 74 49 74 65 | 6d 53 74 79 6c 65 28 72 |.PGetIte|mStyle(r|
|00001a70| 6f 77 29 20 69 66 20 42 | 69 74 77 69 73 65 41 4e |ow) if B|itwiseAN|
|00001a80| 44 28 32 2c 53 74 79 6c | 65 4e 29 20 3d 20 32 20 |D(2,Styl|eN) = 2 |
|00001a90| 74 68 65 6e 12 69 66 20 | 6e 6f 74 20 69 74 61 6c |then.if |not ital|
|00001aa0| 69 63 20 74 68 65 6e 13 | 53 74 79 6c 65 4e 20 3d |ic then.|StyleN =|
|00001ab0| 20 53 74 79 6c 65 4e 20 | 2d 20 32 03 65 6e 64 04 | StyleN |- 2.end.|
|00001ac0| 65 6c 73 65 0e 69 66 20 | 69 74 61 6c 69 63 20 74 |else.if |italic t|
|00001ad0| 68 65 6e 13 53 74 79 6c | 65 4e 20 3d 20 53 74 79 |hen.Styl|eN = Sty|
|00001ae0| 6c 65 4e 20 2b 20 32 03 | 65 6e 64 03 65 6e 64 26 |leN + 2.|end.end&|
|00001af0| 53 65 74 49 74 65 6d 53 | 74 79 6c 65 20 6d 65 2e |SetItemS|tyle me.|
|00001b00| 50 4d 65 6e 75 48 61 6e | 64 6c 65 2c 72 6f 77 2c |PMenuHan|dle,row,|
|00001b10| 53 74 79 6c 65 4e 03 65 | 6e 64 03 65 6e 64 00 15 |StyleN.e|nd.end..|
|00001b20| 27 6d 65 2e 50 52 65 6e | 64 65 72 43 6f 6e 74 72 |'me.PRen|derContr|
|00001b30| 6f 6c 28 30 29 07 45 6e | 64 20 53 75 62 0d 50 47 |ol(0).En|d Sub.PG|
|00001b40| 65 74 49 74 65 6d 53 74 | 79 6c 65 0f 69 74 65 6d |etItemSt|yle.item|
|00001b50| 20 61 73 20 69 6e 74 65 | 67 65 72 07 69 6e 74 65 | as inte|ger.inte|
|00001b60| 67 65 72 01 08 17 08 17 | 0a 32 46 75 6e 63 74 69 |ger.....|.2Functi|
|00001b70| 6f 6e 20 50 47 65 74 49 | 74 65 6d 53 74 79 6c 65 |on PGetI|temStyle|
|00001b80| 28 69 74 65 6d 20 61 73 | 20 69 6e 74 65 67 65 72 |(item as| integer|
|00001b90| 29 20 41 73 20 69 6e 74 | 65 67 65 72 1b 64 69 6d |) As int|eger.dim|
|00001ba0| 20 53 74 79 6c 65 50 74 | 72 20 61 73 20 4d 65 6d | StylePt|r as Mem|
|00001bb0| 6f 72 79 42 6c 6f 63 6b | 00 a1 01 64 65 63 6c 61 |oryBlock|...decla|
|00001bc0| 72 65 20 73 75 62 20 47 | 65 74 49 74 65 6d 53 74 |re sub G|etItemSt|
|00001bd0| 79 6c 65 20 6c 69 62 20 | 22 49 6e 74 65 72 66 61 |yle lib |"Interfa|
|00001be0| 63 65 4c 69 62 22 20 28 | 74 68 65 4d 65 6e 75 20 |ceLib" (|theMenu |
|00001bf0| 61 73 20 69 6e 74 65 67 | 65 72 2c 20 69 74 65 6d |as integ|er, item|
|00001c00| 20 61 73 20 69 6e 74 65 | 67 65 72 2c 20 63 68 53 | as inte|ger, chS|
|00001c10| 74 79 6c 65 20 61 73 20 | 70 74 72 29 00 1c 53 74 |tyle as |ptr)..St|
|00001c20| 79 6c 65 50 74 72 20 3d | 20 4e 65 77 4d 65 6d 6f |ylePtr =| NewMemo|
|00001c30| 72 79 42 6c 6f 63 6b 28 | 34 29 29 47 65 74 49 74 |ryBlock(|4))GetIt|
|00001c40| 65 6d 53 74 79 6c 65 20 | 6d 65 2e 50 4d 65 6e 75 |emStyle |me.PMenu|
|00001c50| 48 61 6e 64 6c 65 2c 69 | 74 65 6d 2c 53 74 79 6c |Handle,i|tem,Styl|
|00001c60| 65 50 74 72 00 1c 72 65 | 74 75 72 6e 20 53 74 79 |ePtr..re|turn Sty|
|00001c70| 6c 65 50 74 72 2e 73 68 | 6f 72 74 28 30 29 5c 32 |lePtr.sh|ort(0)\2|
|00001c80| 35 36 0c 45 6e 64 20 46 | 75 6e 63 74 69 6f 6e 0f |56.End F|unction.|
|00001c90| 53 65 74 52 6f 77 55 6e | 64 65 72 6c 69 6e 65 24 |SetRowUn|derline$|
|00001ca0| 72 6f 77 20 61 73 20 69 | 6e 74 65 67 65 72 2c 20 |row as i|nteger, |
|00001cb0| 75 6e 64 65 72 6c 69 6e | 65 20 61 73 20 62 6f 6f |underlin|e as boo|
|00001cc0| 6c 65 61 6e 00 00 16 01 | 16 01 18 39 53 75 62 20 |lean....|...9Sub |
|00001cd0| 53 65 74 52 6f 77 55 6e | 64 65 72 6c 69 6e 65 28 |SetRowUn|derline(|
|00001ce0| 72 6f 77 20 61 73 20 69 | 6e 74 65 67 65 72 2c 20 |row as i|nteger, |
|00001cf0| 75 6e 64 65 72 6c 69 6e | 65 20 61 73 20 62 6f 6f |underlin|e as boo|
|00001d00| 6c 65 61 6e 29 15 64 69 | 6d 20 53 74 79 6c 65 4e |lean).di|m StyleN|
|00001d10| 20 61 73 20 69 6e 74 65 | 67 65 72 00 16 69 66 20 | as inte|ger..if |
|00001d20| 6d 65 2e 50 4d 65 6e 75 | 48 56 61 6c 69 64 20 74 |me.PMenu|HValid t|
|00001d30| 68 65 6e a3 01 64 65 63 | 6c 61 72 65 20 73 75 62 |hen..dec|lare sub|
|00001d40| 20 53 65 74 49 74 65 6d | 53 74 79 6c 65 20 6c 69 | SetItem|Style li|
|00001d50| 62 20 22 49 6e 74 65 72 | 66 61 63 65 4c 69 62 22 |b "Inter|faceLib"|
|00001d60| 20 28 74 68 65 4d 65 6e | 75 20 61 73 20 69 6e 74 | (theMen|u as int|
|00001d70| 65 67 65 72 2c 20 69 74 | 65 6d 20 61 73 20 69 6e |eger, it|em as in|
|00001d80| 74 65 67 65 72 2c 20 73 | 74 79 6c 65 20 61 73 20 |teger, s|tyle as |
|00001d90| 69 6e 74 65 67 65 72 29 | 1c 69 66 20 72 6f 77 20 |integer)|.if row |
|00001da0| 3e 20 6d 65 2e 4c 69 73 | 74 43 6f 75 6e 74 28 29 |> me.Lis|tCount()|
|00001db0| 20 74 68 65 6e 1e 72 61 | 69 73 65 20 6e 65 77 20 | then.ra|ise new |
|00001dc0| 6f 75 74 4f 66 42 6f 75 | 6e 64 73 45 78 63 65 70 |outOfBou|ndsExcep|
|00001dd0| 74 69 6f 6e 04 65 6c 73 | 65 1e 53 74 79 6c 65 4e |tion.els|e.StyleN|
|00001de0| 20 3d 20 6d 65 2e 50 47 | 65 74 49 74 65 6d 53 74 | = me.PG|etItemSt|
|00001df0| 79 6c 65 28 72 6f 77 29 | 20 69 66 20 42 69 74 77 |yle(row)| if Bitw|
|00001e00| 69 73 65 41 4e 44 28 34 | 2c 53 74 79 6c 65 4e 29 |iseAND(4|,StyleN)|
|00001e10| 20 3d 20 34 20 74 68 65 | 6e 15 69 66 20 6e 6f 74 | = 4 the|n.if not|
|00001e20| 20 75 6e 64 65 72 6c 69 | 6e 65 20 74 68 65 6e 13 | underli|ne then.|
|00001e30| 53 74 79 6c 65 4e 20 3d | 20 53 74 79 6c 65 4e 20 |StyleN =| StyleN |
|00001e40| 2d 20 34 03 65 6e 64 04 | 65 6c 73 65 11 69 66 20 |- 4.end.|else.if |
|00001e50| 75 6e 64 65 72 6c 69 6e | 65 20 74 68 65 6e 13 53 |underlin|e then.S|
|00001e60| 74 79 6c 65 4e 20 3d 20 | 53 74 79 6c 65 4e 20 2b |tyleN = |StyleN +|
|00001e70| 20 34 03 65 6e 64 03 65 | 6e 64 26 53 65 74 49 74 | 4.end.e|nd&SetIt|
|00001e80| 65 6d 53 74 79 6c 65 20 | 6d 65 2e 50 4d 65 6e 75 |emStyle |me.PMenu|
|00001e90| 48 61 6e 64 6c 65 2c 72 | 6f 77 2c 53 74 79 6c 65 |Handle,r|ow,Style|
|00001ea0| 4e 03 65 6e 64 03 65 6e | 64 00 15 27 6d 65 2e 50 |N.end.en|d..'me.P|
|00001eb0| 52 65 6e 64 65 72 43 6f | 6e 74 72 6f 6c 28 30 29 |RenderCo|ntrol(0)|
|00001ec0| 07 45 6e 64 20 53 75 62 | 07 52 6f 77 42 6f 6c 64 |.End Sub|.RowBold|
|00001ed0| 0e 72 6f 77 20 61 73 20 | 69 6e 74 65 67 65 72 07 |.row as |integer.|
|00001ee0| 62 6f 6f 6c 65 61 6e 00 | 03 04 03 04 07 2b 46 75 |boolean.|.....+Fu|
|00001ef0| 6e 63 74 69 6f 6e 20 52 | 6f 77 42 6f 6c 64 28 72 |nction R|owBold(r|
|00001f00| 6f 77 20 61 73 20 69 6e | 74 65 67 65 72 29 20 41 |ow as in|teger) A|
|00001f10| 73 20 62 6f 6f 6c 65 61 | 6e 1c 69 66 20 72 6f 77 |s boolea|n.if row|
|00001f20| 20 3e 20 6d 65 2e 4c 69 | 73 74 43 6f 75 6e 74 28 | > me.Li|stCount(|
|00001f30| 29 20 74 68 65 6e 1e 72 | 61 69 73 65 20 6e 65 77 |) then.r|aise new|
|00001f40| 20 6f 75 74 4f 66 42 6f | 75 6e 64 73 45 78 63 65 | outOfBo|undsExce|
|00001f50| 70 74 69 6f 6e 04 65 6c | 73 65 2e 72 65 74 75 72 |ption.el|se.retur|
|00001f60| 6e 20 42 69 74 77 69 73 | 65 41 4e 44 28 31 2c 6d |n Bitwis|eAND(1,m|
|00001f70| 65 2e 50 47 65 74 49 74 | 65 6d 53 74 79 6c 65 28 |e.PGetIt|emStyle(|
|00001f80| 72 6f 77 29 29 20 3d 20 | 31 03 65 6e 64 0c 45 6e |row)) = |1.end.En|
|00001f90| 64 20 46 75 6e 63 74 69 | 6f 6e 09 52 6f 77 49 74 |d Functi|on.RowIt|
|00001fa0| 61 6c 69 63 0e 72 6f 77 | 20 61 73 20 69 6e 74 65 |alic.row| as inte|
|00001fb0| 67 65 72 07 62 6f 6f 6c | 65 61 6e 00 04 2e 04 2e |ger.bool|ean.....|
|00001fc0| 07 2d 46 75 6e 63 74 69 | 6f 6e 20 52 6f 77 49 74 |.-Functi|on RowIt|
|00001fd0| 61 6c 69 63 28 72 6f 77 | 20 61 73 20 69 6e 74 65 |alic(row| as inte|
|00001fe0| 67 65 72 29 20 41 73 20 | 62 6f 6f 6c 65 61 6e 1c |ger) As |boolean.|
|00001ff0| 69 66 20 72 6f 77 20 3e | 20 6d 65 2e 4c 69 73 74 |if row >| me.List|
|00002000| 43 6f 75 6e 74 28 29 20 | 74 68 65 6e 1e 72 61 69 |Count() |then.rai|
|00002010| 73 65 20 6e 65 77 20 6f | 75 74 4f 66 42 6f 75 6e |se new o|utOfBoun|
|00002020| 64 73 45 78 63 65 70 74 | 69 6f 6e 04 65 6c 73 65 |dsExcept|ion.else|
|00002030| 2e 72 65 74 75 72 6e 20 | 42 69 74 77 69 73 65 41 |.return |BitwiseA|
|00002040| 4e 44 28 32 2c 6d 65 2e | 50 47 65 74 49 74 65 6d |ND(2,me.|PGetItem|
|00002050| 53 74 79 6c 65 28 72 6f | 77 29 29 20 3d 20 32 03 |Style(ro|w)) = 2.|
|00002060| 65 6e 64 0c 45 6e 64 20 | 46 75 6e 63 74 69 6f 6e |end.End |Function|
|00002070| 0c 52 6f 77 55 6e 64 65 | 72 6c 69 6e 65 0e 72 6f |.RowUnde|rline.ro|
|00002080| 77 20 61 73 20 69 6e 74 | 65 67 65 72 07 62 6f 6f |w as int|eger.boo|
|00002090| 6c 65 61 6e 00 04 2e 04 | 2e 07 30 46 75 6e 63 74 |lean....|..0Funct|
|000020a0| 69 6f 6e 20 52 6f 77 55 | 6e 64 65 72 6c 69 6e 65 |ion RowU|nderline|
|000020b0| 28 72 6f 77 20 61 73 20 | 69 6e 74 65 67 65 72 29 |(row as |integer)|
|000020c0| 20 41 73 20 62 6f 6f 6c | 65 61 6e 1c 69 66 20 72 | As bool|ean.if r|
|000020d0| 6f 77 20 3e 20 6d 65 2e | 4c 69 73 74 43 6f 75 6e |ow > me.|ListCoun|
|000020e0| 74 28 29 20 74 68 65 6e | 1e 72 61 69 73 65 20 6e |t() then|.raise n|
|000020f0| 65 77 20 6f 75 74 4f 66 | 42 6f 75 6e 64 73 45 78 |ew outOf|BoundsEx|
|00002100| 63 65 70 74 69 6f 6e 04 | 65 6c 73 65 2e 72 65 74 |ception.|else.ret|
|00002110| 75 72 6e 20 42 69 74 77 | 69 73 65 41 4e 44 28 34 |urn Bitw|iseAND(4|
|00002120| 2c 6d 65 2e 50 47 65 74 | 49 74 65 6d 53 74 79 6c |,me.PGet|ItemStyl|
|00002130| 65 28 72 6f 77 29 29 20 | 3d 20 34 03 65 6e 64 0c |e(row)) |= 4.end.|
|00002140| 45 6e 64 20 46 75 6e 63 | 74 69 6f 6e 0a 53 65 74 |End Func|tion.Set|
|00002150| 52 6f 77 49 63 6f 6e 1f | 72 6f 77 20 61 73 20 69 |RowIcon.|row as i|
|00002160| 6e 74 65 67 65 72 2c 20 | 69 63 6f 6e 20 61 73 20 |nteger, |icon as |
|00002170| 69 6e 74 65 67 65 72 00 | 00 05 02 05 02 08 2f 53 |integer.|....../S|
|00002180| 75 62 20 53 65 74 52 6f | 77 49 63 6f 6e 28 72 6f |ub SetRo|wIcon(ro|
|00002190| 77 20 61 73 20 69 6e 74 | 65 67 65 72 2c 20 69 63 |w as int|eger, ic|
|000021a0| 6f 6e 20 61 73 20 69 6e | 74 65 67 65 72 29 16 69 |on as in|teger).i|
|000021b0| 66 20 6d 65 2e 50 4d 65 | 6e 75 48 56 61 6c 69 64 |f me.PMe|nuHValid|
|000021c0| 20 74 68 65 6e a6 01 64 | 65 63 6c 61 72 65 20 73 | then..d|eclare s|
|000021d0| 75 62 20 53 65 74 49 74 | 65 6d 49 63 6f 6e 20 6c |ub SetIt|emIcon l|
|000021e0| 69 62 20 22 49 6e 74 65 | 72 66 61 63 65 4c 69 62 |ib "Inte|rfaceLib|
|000021f0| 22 20 28 74 68 65 4d 65 | 6e 75 20 61 73 20 69 6e |" (theMe|nu as in|
|00002200| 74 65 67 65 72 2c 20 69 | 74 65 6d 20 61 73 20 69 |teger, i|tem as i|
|00002210| 6e 74 65 67 65 72 2c 20 | 69 63 6f 6e 49 6e 64 65 |nteger, |iconInde|
|00002220| 78 20 61 73 20 69 6e 74 | 65 67 65 72 29 14 2f 2f |x as int|eger).//|
|00002230| 69 66 20 69 63 6f 6e 20 | 3e 20 32 35 36 20 74 68 |if icon |> 256 th|
|00002240| 65 6e 29 53 65 74 49 74 | 65 6d 49 63 6f 6e 20 6d |en)SetIt|emIcon m|
|00002250| 65 2e 50 4d 65 6e 75 48 | 61 6e 64 6c 65 2c 72 6f |e.PMenuH|andle,ro|
|00002260| 77 2c 69 63 6f 6e 20 2d | 20 32 35 36 05 2f 2f 65 |w,icon -| 256.//e|
|00002270| 6e 64 03 65 6e 64 07 45 | 6e 64 20 53 75 62 0c 50 |nd.end.E|nd Sub.P|
|00002280| 47 65 74 49 74 65 6d 49 | 63 6f 6e 0f 69 74 65 6d |GetItemI|con.item|
|00002290| 20 61 73 20 69 6e 74 65 | 67 65 72 07 69 6e 74 65 | as inte|ger.inte|
|000022a0| 67 65 72 01 05 28 05 28 | 09 31 46 75 6e 63 74 69 |ger..(.(|.1Functi|
|000022b0| 6f 6e 20 50 47 65 74 49 | 74 65 6d 49 63 6f 6e 28 |on PGetI|temIcon(|
|000022c0| 69 74 65 6d 20 61 73 20 | 69 6e 74 65 67 65 72 29 |item as |integer)|
|000022d0| 20 41 73 20 69 6e 74 65 | 67 65 72 1b 64 69 6d 20 | As inte|ger.dim |
|000022e0| 69 63 6f 6e 48 50 74 72 | 20 61 73 20 4d 65 6d 6f |iconHPtr| as Memo|
|000022f0| 72 79 42 6c 6f 63 6b 00 | a0 01 64 65 63 6c 61 72 |ryBlock.|..declar|
|00002300| 65 20 73 75 62 20 47 65 | 74 49 74 65 6d 49 63 6f |e sub Ge|tItemIco|
|00002310| 6e 20 6c 69 62 20 22 49 | 6e 74 65 72 66 61 63 65 |n lib "I|nterface|
|00002320| 4c 69 62 22 20 28 74 68 | 65 4d 65 6e 75 20 61 73 |Lib" (th|eMenu as|
|00002330| 20 69 6e 74 65 67 65 72 | 2c 20 69 74 65 6d 20 61 | integer|, item a|
|00002340| 73 20 69 6e 74 65 67 65 | 72 2c 20 49 63 6f 6e 50 |s intege|r, IconP|
|00002350| 74 72 20 61 73 20 70 74 | 72 29 1c 49 63 6f 6e 48 |tr as pt|r).IconH|
|00002360| 50 74 72 20 3d 20 4e 65 | 77 4d 65 6d 6f 72 79 42 |Ptr = Ne|wMemoryB|
|00002370| 6c 6f 63 6b 28 34 29 28 | 47 65 74 49 74 65 6d 49 |lock(4)(|GetItemI|
|00002380| 63 6f 6e 20 6d 65 2e 50 | 4d 65 6e 75 48 61 6e 64 |con me.P|MenuHand|
|00002390| 6c 65 2c 69 74 65 6d 2c | 49 63 6f 6e 48 50 74 72 |le,item,|IconHPtr|
|000023a0| 00 1e 72 65 74 75 72 6e | 20 49 63 6f 6e 48 50 74 |..return| IconHPt|
|000023b0| 72 2e 73 68 6f 72 74 28 | 30 29 20 2b 20 32 35 36 |r.short(|0) + 256|
|000023c0| 0c 45 6e 64 20 46 75 6e | 63 74 69 6f 6e 0d 52 65 |.End Fun|ction.Re|
|000023d0| 6d 6f 76 65 52 6f 77 49 | 63 6f 6e 0e 72 6f 77 20 |moveRowI|con.row |
|000023e0| 61 73 20 69 6e 74 65 67 | 65 72 00 00 01 00 01 00 |as integ|er......|
|000023f0| 03 21 53 75 62 20 52 65 | 6d 6f 76 65 52 6f 77 49 |.!Sub Re|moveRowI|
|00002400| 63 6f 6e 28 72 6f 77 20 | 61 73 20 69 6e 74 65 67 |con(row |as integ|
|00002410| 65 72 29 14 6d 65 2e 53 | 65 74 52 6f 77 49 63 6f |er).me.S|etRowIco|
|00002420| 6e 28 72 6f 77 2c 30 29 | 07 45 6e 64 20 53 75 62 |n(row,0)|.End Sub|
|00002430| 0d 47 65 74 4d 65 6e 75 | 48 65 69 67 68 74 00 07 |.GetMenu|Height..|
|00002440| 69 6e 74 65 67 65 72 00 | 05 18 05 18 0c 23 46 75 |integer.|.....#Fu|
|00002450| 6e 63 74 69 6f 6e 20 47 | 65 74 4d 65 6e 75 48 65 |nction G|etMenuHe|
|00002460| 69 67 68 74 28 29 20 41 | 73 20 69 6e 74 65 67 65 |ight() A|s intege|
|00002470| 72 15 64 69 6d 20 6d 62 | 20 61 73 20 6d 65 6d 6f |r.dim mb| as memo|
|00002480| 72 79 42 6c 6f 63 6b 00 | 92 01 64 65 63 6c 61 72 |ryBlock.|..declar|
|00002490| 65 20 73 75 62 20 43 61 | 6c 63 4d 65 6e 75 53 69 |e sub Ca|lcMenuSi|
|000024a0| 7a 65 20 4c 69 62 20 22 | 49 6e 74 65 72 66 61 63 |ze Lib "|Interfac|
|000024b0| 65 4c 69 62 22 20 28 74 | 68 65 4d 65 6e 75 20 61 |eLib" (t|heMenu a|
|000024c0| 73 20 49 6e 74 65 67 65 | 72 29 20 49 6e 6c 69 6e |s Intege|r) Inlin|
|000024d0| 65 36 38 4b 28 22 41 39 | 34 38 22 29 00 19 43 61 |e68K("A9|48")..Ca|
|000024e0| 6c 63 4d 65 6e 75 53 69 | 7a 65 20 50 4d 65 6e 75 |lcMenuSi|ze PMenu|
|000024f0| 48 61 6e 64 6c 65 20 00 | 16 6d 62 20 3d 20 6e 65 |Handle .|.mb = ne|
|00002500| 77 4d 65 6d 6f 72 79 42 | 6c 6f 63 6b 28 30 29 1b |wMemoryB|lock(0).|
|00002510| 6d 62 2e 6c 6f 6e 67 28 | 30 29 20 3d 20 6d 65 2e |mb.long(|0) = me.|
|00002520| 50 4d 65 6e 75 48 61 6e | 64 6c 65 00 20 72 65 74 |PMenuHan|dle. ret|
|00002530| 75 72 6e 20 6d 62 2e 70 | 74 72 28 30 29 2e 70 74 |urn mb.p|tr(0).pt|
|00002540| 72 28 30 29 2e 73 68 6f | 72 74 28 34 29 0c 45 6e |r(0).sho|rt(4).En|
|00002550| 64 20 46 75 6e 63 74 69 | 6f 6e 02 75 70 00 00 00 |d Functi|on.up...|
|00002560| 27 00 27 00 2e 08 53 75 | 62 20 75 70 28 29 00 14 |'.'...Su|b up()..|
|00002570| 27 63 68 65 63 6b 69 6e | 67 20 69 66 20 61 63 74 |'checkin|g if act|
|00002580| 69 76 65 20 13 69 66 20 | 6e 6f 74 20 65 6e 61 62 |ive .if |not enab|
|00002590| 6c 65 64 20 74 68 65 6e | 0d 45 6e 61 62 6c 65 28 |led then|.Enable(|
|000025a0| 66 61 6c 73 65 29 06 72 | 65 74 75 72 6e 06 65 6e |false).r|eturn.en|
|000025b0| 64 20 69 66 00 2a 27 63 | 68 61 6e 67 69 6e 67 20 |d if.*'c|hanging |
|000025c0| 63 75 72 73 6f 72 20 77 | 68 65 6e 20 6d 6f 75 73 |cursor w|hen mous|
|000025d0| 65 20 69 6e 20 69 6e 20 | 63 6f 6e 74 72 6f 6c 20 |e in in |control |
|000025e0| 31 61 70 70 2e 6d 6f 75 | 73 65 63 75 72 73 6f 72 |1app.mou|secursor|
|000025f0| 20 3d 20 61 70 70 2e 72 | 65 73 6f 75 72 63 65 46 | = app.r|esourceF|
|00002600| 6f 72 6b 2e 67 65 74 63 | 75 72 73 6f 72 28 31 33 |ork.getc|ursor(13|
|00002610| 39 29 00 3c 27 64 72 61 | 77 69 6e 67 20 70 69 63 |9).<'dra|wing pic|
|00002620| 74 75 72 65 20 6f 66 66 | 2d 73 63 72 65 65 6e 20 |ture off|-screen |
|00002630| 62 65 66 6f 72 65 20 73 | 65 74 74 69 6e 67 20 70 |before s|etting p|
|00002640| 69 63 74 75 72 65 20 6f | 6e 20 43 61 6e 76 61 73 |icture o|n Canvas|
|00002650| 33 62 75 66 66 65 72 20 | 3d 20 6e 65 77 50 69 63 |3buffer |= newPic|
|00002660| 74 75 72 65 28 77 69 64 | 74 68 2c 20 68 65 69 67 |ture(wid|th, heig|
|00002670| 68 74 2c 20 73 63 72 65 | 65 6e 28 30 29 2e 64 65 |ht, scre|en(0).de|
|00002680| 70 74 68 29 13 67 20 3d | 20 62 75 66 66 65 72 2e |pth).g =| buffer.|
|00002690| 67 72 61 70 68 69 63 73 | 00 3c 27 66 69 6c 6c 69 |graphics|.<'filli|
|000026a0| 6e 67 20 74 68 65 20 62 | 75 74 74 6f 6e 20 62 61 |ng the b|utton ba|
|000026b0| 63 6b 67 72 6f 75 6e 64 | 20 77 69 74 68 20 63 75 |ckground| with cu|
|000026c0| 72 72 65 6e 74 20 62 61 | 63 6b 67 72 6f 75 6e 64 |rrent ba|ckground|
|000026d0| 20 63 6f 6c 6f 72 17 67 | 2e 66 6f 72 65 43 6f 6c | color.g|.foreCol|
|000026e0| 6f 72 20 3d 20 62 61 63 | 6b 43 6f 6c 6f 72 1f 67 |or = bac|kColor.g|
|000026f0| 2e 66 69 6c 6c 52 65 63 | 74 28 30 2c 20 30 2c 20 |.fillRec|t(0, 0, |
|00002700| 77 69 64 74 68 2c 20 68 | 65 69 67 68 74 29 00 1b |width, h|eight)..|
|00002710| 27 64 72 61 77 69 6e 67 | 20 62 75 74 74 6f 6e 20 |'drawing| button |
|00002720| 6d 6f 75 73 65 64 20 6f | 76 65 72 19 67 2e 66 6f |moused o|ver.g.fo|
|00002730| 72 65 43 6f 6c 6f 72 20 | 3d 20 6c 69 67 68 74 42 |reColor |= lightB|
|00002740| 65 76 65 6c 20 1b 67 2e | 64 72 61 77 6c 69 6e 65 |evel .g.|drawline|
|00002750| 28 30 2c 20 30 2c 20 30 | 2c 20 77 69 64 74 68 29 |(0, 0, 0|, width)|
|00002760| 20 1b 67 2e 64 72 61 77 | 6c 69 6e 65 28 30 2c 20 | .g.draw|line(0, |
|00002770| 30 2c 20 77 69 64 74 68 | 2c 30 20 29 20 19 67 2e |0, width|,0 ) .g.|
|00002780| 66 6f 72 65 43 6f 6c 6f | 72 20 3d 20 44 61 72 6b |foreColo|r = Dark|
|00002790| 42 65 76 65 6c 20 20 29 | 67 2e 64 72 61 77 6c 69 |Bevel )|g.drawli|
|000027a0| 6e 65 28 77 69 64 74 68 | 2d 31 2c 20 31 2c 20 77 |ne(width|-1, 1, w|
|000027b0| 69 64 74 68 2d 31 2c 20 | 68 65 69 67 68 74 2d 31 |idth-1, |height-1|
|000027c0| 29 2a 67 2e 64 72 61 77 | 6c 69 6e 65 28 31 2c 20 |)*g.draw|line(1, |
|000027d0| 68 65 69 67 68 74 2d 31 | 2c 20 77 69 64 74 68 2d |height-1|, width-|
|000027e0| 31 2c 20 68 65 69 67 68 | 74 2d 31 29 0e 27 64 72 |1, heigh|t-1).'dr|
|000027f0| 61 77 69 6e 67 20 74 65 | 78 74 20 18 67 2e 66 6f |awing te|xt .g.fo|
|00002800| 72 65 43 6f 6c 6f 72 20 | 3d 20 74 65 78 74 41 63 |reColor |= textAc|
|00002810| 74 69 76 65 1b 67 2e 54 | 65 78 74 66 6f 6e 74 20 |tive.g.T|extfont |
|00002820| 3d 20 42 75 74 74 6f 6e | 54 65 78 74 46 6f 6e 74 |= Button|TextFont|
|00002830| 1b 67 2e 74 65 78 74 73 | 69 7a 65 20 3d 20 42 75 |.g.texts|ize = Bu|
|00002840| 74 74 6f 6e 54 65 78 74 | 53 69 7a 65 00 23 27 73 |ttonText|Size.#'s|
|00002850| 65 74 20 6e 6f 72 6d 61 | 6c 20 74 65 78 74 20 78 |et norma|l text x|
|00002860| 2c 20 79 20 70 6f 73 69 | 74 69 6f 6e 20 68 65 72 |, y posi|tion her|
|00002870| 65 20 67 2e 64 72 61 77 | 73 74 72 69 6e 67 20 63 |e g.draw|string c|
|00002880| 61 70 74 69 6f 6e 2c 20 | 67 65 74 58 2c 20 67 65 |aption, |getX, ge|
|00002890| 74 59 00 30 27 64 72 61 | 77 69 6e 67 20 69 63 6f |tY.0'dra|wing ico|
|000028a0| 6e 20 28 70 69 63 74 75 | 72 65 20 73 68 6f 75 6c |n (pictu|re shoul|
|000028b0| 64 20 62 65 20 31 36 20 | 78 20 31 36 20 70 69 78 |d be 16 |x 16 pix|
|000028c0| 65 6c 73 29 0a 64 72 61 | 77 49 63 6f 6e 28 29 00 |els).dra|wIcon().|
|000028d0| 18 27 64 72 61 77 69 6e | 67 20 41 72 72 6f 77 20 |.'drawin|g Arrow |
|000028e0| 6f 6e 20 62 75 74 74 6f | 6e 0c 64 72 61 77 41 72 |on butto|n.drawAr|
|000028f0| 72 6f 77 28 67 29 00 23 | 27 64 72 61 77 69 6e 67 |row(g).#|'drawing|
|00002900| 20 70 69 63 74 75 72 65 | 20 28 62 75 74 74 6f 6e | picture| (button|
|00002910| 29 20 6f 6e 20 43 61 6e | 76 61 73 21 67 72 61 70 |) on Can|vas!grap|
|00002920| 68 69 63 73 2e 64 72 61 | 77 50 69 63 74 75 72 65 |hics.dra|wPicture|
|00002930| 20 62 75 66 66 65 72 2c | 20 30 2c 20 30 00 00 07 | buffer,| 0, 0...|
|00002940| 65 6e 64 20 73 75 62 07 | 45 6e 64 20 53 75 62 04 |end sub.|End Sub.|
|00002950| 67 65 74 59 00 07 69 6e | 74 65 67 65 72 00 0b 13 |getY..in|teger...|
|00002960| 0b 13 13 1a 46 75 6e 63 | 74 69 6f 6e 20 67 65 74 |....Func|tion get|
|00002970| 59 28 29 20 41 73 20 69 | 6e 74 65 67 65 72 3e 27 |Y() As i|nteger>'|
|00002980| 72 65 74 75 72 6e 73 20 | 74 68 65 20 63 6f 72 72 |returns |the corr|
|00002990| 65 63 74 20 59 20 64 69 | 73 74 61 6e 63 65 20 66 |ect Y di|stance f|
|000029a0| 6f 72 20 74 65 78 74 20 | 74 6f 20 62 65 20 69 6e |or text |to be in|
|000029b0| 20 74 68 65 20 63 6f 72 | 72 65 63 74 20 1d 27 70 | the cor|rect .'p|
|000029c0| 6f 73 69 74 69 6f 6e 20 | 6e 6f 20 6d 61 74 74 65 |osition |no matte|
|000029d0| 72 20 77 68 61 74 20 66 | 6f 6e 74 00 10 64 69 6d |r what f|ont..dim|
|000029e0| 20 70 20 61 73 20 70 69 | 63 74 75 72 65 11 64 69 | p as pi|cture.di|
|000029f0| 6d 20 72 20 61 73 20 67 | 72 61 70 68 69 63 73 00 |m r as g|raphics.|
|00002a00| 19 70 20 3d 20 6e 65 77 | 50 69 63 74 75 72 65 28 |.p = new|Picture(|
|00002a10| 20 31 2c 20 31 2c 20 31 | 20 29 0e 72 20 3d 20 70 | 1, 1, 1| ).r = p|
|00002a20| 2e 67 72 61 70 68 69 63 | 73 00 1b 72 2e 74 65 78 |.graphic|s..r.tex|
|00002a30| 74 46 6f 6e 74 20 3d 20 | 42 75 74 74 6f 6e 54 65 |tFont = |ButtonTe|
|00002a40| 78 74 46 6f 6e 74 1b 72 | 2e 74 65 78 74 53 69 7a |xtFont.r|.textSiz|
|00002a50| 65 20 3d 20 42 75 74 74 | 6f 6e 54 65 78 74 53 69 |e = Butt|onTextSi|
|00002a60| 7a 65 00 13 69 66 20 61 | 75 74 6f 43 65 6e 74 65 |ze..if a|utoCente|
|00002a70| 72 56 20 74 68 65 6e 87 | 01 72 65 74 75 72 6e 20 |rV then.|.return |
|00002a80| 28 20 28 20 68 65 69 67 | 68 74 20 2d 20 72 2e 74 |( ( heig|ht - r.t|
|00002a90| 65 78 74 48 65 69 67 68 | 74 20 20 29 20 2f 20 32 |extHeigh|t ) / 2|
|00002aa0| 20 29 20 2b 20 28 20 72 | 2e 74 65 78 74 48 65 69 | ) + ( r|.textHei|
|00002ab0| 67 68 74 20 2a 20 30 2e | 37 35 20 29 20 2b 20 31 |ght * 0.|75 ) + 1|
|00002ac0| 04 65 6c 73 65 09 72 65 | 74 75 72 6e 20 31 35 06 |.else.re|turn 15.|
|00002ad0| 65 6e 64 20 69 66 0c 45 | 6e 64 20 46 75 6e 63 74 |end if.E|nd Funct|
|00002ae0| 69 6f 6e 04 67 65 74 58 | 00 07 69 6e 74 65 67 65 |ion.getX|..intege|
|00002af0| 72 00 13 00 13 00 15 1a | 46 75 6e 63 74 69 6f 6e |r.......|Function|
|00002b00| 20 67 65 74 58 28 29 20 | 41 73 20 69 6e 74 65 67 | getX() |As integ|
|00002b10| 65 72 18 64 69 6d 20 70 | 69 63 74 57 69 64 74 68 |er.dim p|ictWidth|
|00002b20| 20 61 73 20 69 6e 74 65 | 67 65 72 00 2f 27 67 65 | as inte|ger./'ge|
|00002b30| 74 74 69 6e 67 20 77 69 | 64 74 68 20 6f 66 20 70 |tting wi|dth of p|
|00002b40| 69 63 74 75 72 65 20 6f | 6e 6c 79 20 6f 6e 63 65 |icture o|nly once|
|00002b50| 20 66 6f 72 20 73 70 65 | 65 64 21 3f 1c 70 69 63 | for spe|ed!?.pic|
|00002b60| 74 57 69 64 74 68 20 3d | 20 70 69 63 74 4e 6f 72 |tWidth =| pictNor|
|00002b70| 6d 61 6c 2e 77 69 64 74 | 68 00 17 69 66 20 70 69 |mal.widt|h..if pi|
|00002b80| 63 74 57 69 64 74 68 20 | 3c 3d 20 31 36 20 74 68 |ctWidth |<= 16 th|
|00002b90| 65 6e 37 27 73 70 61 63 | 65 72 73 20 3d 20 32 20 |en7'spac|ers = 2 |
|00002ba0| 66 6f 72 20 6c 65 66 74 | 20 65 64 67 65 2c 20 34 |for left| edge, 4|
|00002bb0| 20 66 6f 72 20 62 65 74 | 77 65 65 6e 20 69 63 6f | for bet|ween ico|
|00002bc0| 6e 20 61 6e 64 20 74 65 | 78 74 33 27 69 66 20 70 |n and te|xt3'if p|
|00002bd0| 69 63 74 75 72 65 20 69 | 73 20 31 36 78 31 36 20 |icture i|s 16x16 |
|00002be0| 69 63 6f 6e 2c 20 72 65 | 74 75 72 6e 69 6e 67 20 |icon, re|turning |
|00002bf0| 31 36 20 61 6e 64 20 73 | 70 61 63 65 72 73 09 72 |16 and s|pacers.r|
|00002c00| 65 74 75 72 6e 20 32 32 | 00 2e 65 6c 73 65 69 66 |eturn 22|..elseif|
|00002c10| 20 31 36 20 3c 20 70 69 | 63 74 57 69 64 74 68 20 | 16 < pi|ctWidth |
|00002c20| 61 6e 64 20 70 69 63 74 | 57 69 64 74 68 20 3c 3d |and pict|Width <=|
|00002c30| 20 33 32 20 74 68 65 6e | 33 27 69 66 20 70 69 63 | 32 then|3'if pic|
|00002c40| 74 75 72 65 20 69 73 20 | 33 32 78 33 32 20 69 63 |ture is |32x32 ic|
|00002c50| 6f 6e 2c 20 72 65 74 75 | 72 6e 69 6e 67 20 33 32 |on, retu|rning 32|
|00002c60| 20 61 6e 64 20 73 70 61 | 63 65 72 73 09 72 65 74 | and spa|cers.ret|
|00002c70| 75 72 6e 20 33 38 00 04 | 65 6c 73 65 3c 27 62 69 |urn 38..|else<'bi|
|00002c80| 67 67 65 72 20 74 68 65 | 6e 20 33 32 78 33 32 20 |gger the|n 32x32 |
|00002c90| 69 63 6f 6e 2c 20 72 65 | 74 75 72 6e 69 6e 67 20 |icon, re|turning |
|00002ca0| 70 69 63 74 75 72 65 2e | 77 69 64 74 68 20 61 6e |picture.|width an|
|00002cb0| 64 20 73 70 61 63 65 72 | 73 14 72 65 74 75 72 6e |d spacer|s.return|
|00002cc0| 20 70 69 63 74 57 69 64 | 74 68 20 2b 20 36 06 65 | pictWid|th + 6.e|
|00002cd0| 6e 64 20 69 66 00 0c 45 | 6e 64 20 46 75 6e 63 74 |nd if..E|nd Funct|
|00002ce0| 69 6f 6e 09 67 65 74 53 | 57 69 64 74 68 00 07 69 |ion.getS|Width..i|
|00002cf0| 6e 74 65 67 65 72 00 0a | 30 0a 30 0c 1f 46 75 6e |nteger..|0.0..Fun|
|00002d00| 63 74 69 6f 6e 20 67 65 | 74 53 57 69 64 74 68 28 |ction ge|tSWidth(|
|00002d10| 29 20 41 73 20 69 6e 74 | 65 67 65 72 00 3d 27 67 |) As int|eger.='g|
|00002d20| 65 74 74 69 6e 67 20 73 | 74 72 69 6e 67 20 77 69 |etting s|tring wi|
|00002d30| 64 74 68 20 77 69 74 68 | 20 36 20 70 69 78 65 6c |dth with| 6 pixel|
|00002d40| 73 20 6f 6e 20 72 69 67 | 68 74 20 73 69 64 65 2f |s on rig|ht side/|
|00002d50| 32 33 20 6f 6e 20 6c 65 | 66 74 2e 1c 67 72 61 70 |23 on le|ft..grap|
|00002d60| 68 69 63 73 2e 54 65 78 | 74 66 6f 6e 74 20 3d 20 |hics.Tex|tfont = |
|00002d70| 54 65 78 74 46 6f 6e 74 | 1c 67 72 61 70 68 69 63 |TextFont|.graphic|
|00002d80| 73 2e 74 65 78 74 73 69 | 7a 65 20 3d 20 54 65 78 |s.textsi|ze = Tex|
|00002d90| 74 53 69 7a 65 19 27 64 | 6f 6e 27 74 20 61 73 6b |tSize.'d|on't ask|
|00002da0| 20 68 6f 77 20 49 20 67 | 6f 74 20 74 68 69 73 29 | how I g|ot this)|
|00002db0| 69 66 20 67 72 61 70 68 | 69 63 73 2e 73 74 72 69 |if graph|ics.stri|
|00002dc0| 6e 67 57 69 64 74 68 28 | 63 61 70 74 69 6f 6e 29 |ngWidth(|caption)|
|00002dd0| 20 3d 20 30 20 74 68 65 | 6e 10 72 65 74 75 72 6e | = 0 the|n.return|
|00002de0| 20 67 65 74 58 20 2b 20 | 31 32 06 65 6e 64 20 69 | getX + |12.end i|
|00002df0| 66 00 30 72 65 74 75 72 | 6e 20 67 72 61 70 68 69 |f.0retur|n graphi|
|00002e00| 63 73 2e 73 74 72 69 6e | 67 57 69 64 74 68 28 63 |cs.strin|gWidth(c|
|00002e10| 61 70 74 69 6f 6e 29 20 | 2b 20 67 65 74 58 20 2b |aption) |+ getX +|
|00002e20| 20 31 37 0c 45 6e 64 20 | 46 75 6e 63 74 69 6f 6e | 17.End |Function|
|00002e30| 08 67 65 74 50 69 63 74 | 59 00 07 69 6e 74 65 67 |.getPict|Y..integ|
|00002e40| 65 72 00 07 00 07 00 09 | 1e 46 75 6e 63 74 69 6f |er......|.Functio|
|00002e50| 6e 20 67 65 74 50 69 63 | 74 59 28 29 20 41 73 20 |n getPic|tY() As |
|00002e60| 69 6e 74 65 67 65 72 3e | 27 72 65 74 75 72 6e 73 |integer>|'returns|
|00002e70| 20 74 68 65 20 70 69 63 | 74 20 79 20 70 6f 73 69 | the pic|t y posi|
|00002e80| 74 69 6f 6e 20 6e 6f 20 | 6d 61 74 74 65 72 20 77 |tion no |matter w|
|00002e90| 68 61 74 20 73 69 7a 65 | 20 74 68 65 20 62 75 74 |hat size| the but|
|00002ea0| 74 6f 6e 20 69 73 13 69 | 66 20 61 75 74 6f 43 65 |ton is.i|f autoCe|
|00002eb0| 6e 74 65 72 56 20 74 68 | 65 6e 29 72 65 74 75 72 |nterV th|en)retur|
|00002ec0| 6e 20 28 20 68 65 69 67 | 68 74 20 2d 20 70 69 63 |n ( heig|ht - pic|
|00002ed0| 74 4e 6f 72 6d 61 6c 2e | 68 65 69 67 68 74 20 29 |tNormal.|height )|
|00002ee0| 20 2f 20 32 04 65 6c 73 | 65 08 72 65 74 75 72 6e | / 2.els|e.return|
|00002ef0| 20 33 06 65 6e 64 20 69 | 66 00 0c 45 6e 64 20 46 | 3.end i|f..End F|
|00002f00| 75 6e 63 74 69 6f 6e 06 | 65 6e 61 62 6c 65 13 61 |unction.|enable.a|
|00002f10| 63 74 69 76 61 74 65 20 | 61 73 20 62 6f 6f 6c 65 |ctivate |as boole|
|00002f20| 61 6e 00 00 20 00 20 00 | 28 1f 53 75 62 20 65 6e |an.. . .|(.Sub en|
|00002f30| 61 62 6c 65 28 61 63 74 | 69 76 61 74 65 20 61 73 |able(act|ivate as|
|00002f40| 20 62 6f 6f 6c 65 61 6e | 29 00 3c 27 49 66 20 56 | boolean|).<'If V|
|00002f50| 61 6c 75 65 20 3d 20 74 | 72 75 65 20 74 68 65 6e |alue = t|rue then|
|00002f60| 20 65 6e 61 62 6c 69 6e | 67 20 74 68 65 20 62 75 | enablin|g the bu|
|00002f70| 74 74 6f 6e 2c 20 6f 74 | 68 65 72 77 69 73 65 20 |tton, ot|herwise |
|00002f80| 64 72 61 77 69 6e 67 0d | 27 69 74 20 64 69 73 61 |drawing.|'it disa|
|00002f90| 62 6c 65 64 2e 00 10 69 | 66 20 61 63 74 69 76 61 |bled...i|f activa|
|00002fa0| 74 65 20 74 68 65 6e 0e | 65 6e 61 62 6c 65 64 20 |te then.|enabled |
|00002fb0| 3d 20 74 72 75 65 09 73 | 74 61 74 65 20 3d 20 30 |= true.s|tate = 0|
|00002fc0| 08 6e 6f 72 6d 61 6c 28 | 29 04 65 6c 73 65 00 0f |.normal(|).else..|
|00002fd0| 65 6e 61 62 6c 65 64 20 | 3d 20 66 61 6c 73 65 00 |enabled |= false.|
|00002fe0| 3c 27 64 72 61 77 69 6e | 67 20 70 69 63 74 75 72 |<'drawin|g pictur|
|00002ff0| 65 20 6f 66 66 2d 73 63 | 72 65 65 6e 20 62 65 66 |e off-sc|reen bef|
|00003000| 6f 72 65 20 73 65 74 74 | 69 6e 67 20 70 69 63 74 |ore sett|ing pict|
|00003010| 75 72 65 20 6f 6e 20 43 | 61 6e 76 61 73 33 62 75 |ure on C|anvas3bu|
|00003020| 66 66 65 72 20 3d 20 6e | 65 77 50 69 63 74 75 72 |ffer = n|ewPictur|
|00003030| 65 28 77 69 64 74 68 2c | 20 68 65 69 67 68 74 2c |e(width,| height,|
|00003040| 20 73 63 72 65 65 6e 28 | 30 29 2e 64 65 70 74 68 | screen(|0).depth|
|00003050| 29 13 67 20 3d 20 62 75 | 66 66 65 72 2e 67 72 61 |).g = bu|ffer.gra|
|00003060| 70 68 69 63 73 00 3c 27 | 66 69 6c 6c 69 6e 67 20 |phics.<'|filling |
|00003070| 74 68 65 20 62 75 74 74 | 6f 6e 20 62 61 63 6b 67 |the butt|on backg|
|00003080| 72 6f 75 6e 64 20 77 69 | 74 68 20 63 75 72 72 65 |round wi|th curre|
|00003090| 6e 74 20 62 61 63 6b 67 | 72 6f 75 6e 64 20 63 6f |nt backg|round co|
|000030a0| 6c 6f 72 1f 67 2e 66 6f | 72 65 43 6f 6c 6f 72 20 |lor.g.fo|reColor |
|000030b0| 3d 20 62 61 63 6b 43 6f | 6c 6f 72 44 69 73 61 62 |= backCo|lorDisab|
|000030c0| 6c 65 64 1f 67 2e 66 69 | 6c 6c 52 65 63 74 28 30 |led.g.fi|llRect(0|
|000030d0| 2c 20 30 2c 20 77 69 64 | 74 68 2c 20 68 65 69 67 |, 0, wid|th, heig|
|000030e0| 68 74 29 00 1a 67 2e 66 | 6f 72 65 43 6f 6c 6f 72 |ht)..g.f|oreColor|
|000030f0| 20 3d 20 74 65 78 74 44 | 69 73 61 62 6c 65 64 1b | = textD|isabled.|
|00003100| 67 2e 54 65 78 74 66 6f | 6e 74 20 3d 20 42 75 74 |g.Textfo|nt = But|
|00003110| 74 6f 6e 54 65 78 74 46 | 6f 6e 74 1b 67 2e 74 65 |tonTextF|ont.g.te|
|00003120| 78 74 73 69 7a 65 20 3d | 20 42 75 74 74 6f 6e 54 |xtsize =| ButtonT|
|00003130| 65 78 74 53 69 7a 65 23 | 27 73 65 74 20 6e 6f 72 |extSize#|'set nor|
|00003140| 6d 61 6c 20 74 65 78 74 | 20 78 2c 20 79 20 70 6f |mal text| x, y po|
|00003150| 73 69 74 69 6f 6e 20 68 | 65 72 65 1e 67 2e 64 72 |sition h|ere.g.dr|
|00003160| 61 77 73 74 72 69 6e 67 | 20 63 61 70 74 69 6f 6e |awstring| caption|
|00003170| 2c 20 32 32 2c 20 67 65 | 74 59 00 1e 27 64 72 61 |, 22, ge|tY..'dra|
|00003180| 77 69 6e 67 20 69 63 6f | 6e 20 69 6e 20 63 6f 72 |wing ico|n in cor|
|00003190| 72 65 63 74 20 73 74 61 | 74 65 0a 64 72 61 77 49 |rect sta|te.drawI|
|000031a0| 63 6f 6e 28 29 00 1f 27 | 64 72 61 77 69 6e 67 20 |con()..'|drawing |
|000031b0| 61 72 72 6f 77 20 69 6e | 20 63 6f 72 72 65 63 74 |arrow in| correct|
|000031c0| 20 73 74 61 74 65 0c 64 | 72 61 77 41 72 72 6f 77 | state.d|rawArrow|
|000031d0| 28 67 29 00 23 27 64 72 | 61 77 69 6e 67 20 70 69 |(g).#'dr|awing pi|
|000031e0| 63 74 75 72 65 20 28 62 | 75 74 74 6f 6e 29 20 6f |cture (b|utton) o|
|000031f0| 6e 20 43 61 6e 76 61 73 | 21 67 72 61 70 68 69 63 |n Canvas|!graphic|
|00003200| 73 2e 64 72 61 77 50 69 | 63 74 75 72 65 20 62 75 |s.drawPi|cture bu|
|00003210| 66 66 65 72 2c 20 30 2c | 20 30 00 00 06 65 6e 64 |ffer, 0,| 0...end|
|00003220| 20 69 66 00 07 45 6e 64 | 20 53 75 62 04 64 6f 77 | if..End| Sub.dow|
|00003230| 6e 00 00 00 24 00 24 00 | 2b 0a 53 75 62 20 64 6f |n...$.$.|+.Sub do|
|00003240| 77 6e 28 29 14 27 63 68 | 65 63 6b 69 6e 67 20 69 |wn().'ch|ecking i|
|00003250| 66 20 61 63 74 69 76 65 | 20 13 69 66 20 6e 6f 74 |f active| .if not|
|00003260| 20 65 6e 61 62 6c 65 64 | 20 74 68 65 6e 0d 45 6e | enabled| then.En|
|00003270| 61 62 6c 65 28 66 61 6c | 73 65 29 06 72 65 74 75 |able(fal|se).retu|
|00003280| 72 6e 06 65 6e 64 20 69 | 66 00 3c 27 64 72 61 77 |rn.end i|f.<'draw|
|00003290| 69 6e 67 20 70 69 63 74 | 75 72 65 20 6f 66 66 2d |ing pict|ure off-|
|000032a0| 73 63 72 65 65 6e 20 62 | 65 66 6f 72 65 20 73 65 |screen b|efore se|
|000032b0| 74 74 69 6e 67 20 70 69 | 63 74 75 72 65 20 6f 6e |tting pi|cture on|
|000032c0| 20 43 61 6e 76 61 73 33 | 62 75 66 66 65 72 20 3d | Canvas3|buffer =|
|000032d0| 20 6e 65 77 50 69 63 74 | 75 72 65 28 77 69 64 74 | newPict|ure(widt|
|000032e0| 68 2c 20 68 65 69 67 68 | 74 2c 20 73 63 72 65 65 |h, heigh|t, scree|
|000032f0| 6e 28 30 29 2e 64 65 70 | 74 68 29 13 67 20 3d 20 |n(0).dep|th).g = |
|00003300| 62 75 66 66 65 72 2e 67 | 72 61 70 68 69 63 73 00 |buffer.g|raphics.|
|00003310| 3c 27 66 69 6c 6c 69 6e | 67 20 74 68 65 20 62 75 |<'fillin|g the bu|
|00003320| 74 74 6f 6e 20 62 61 63 | 6b 67 72 6f 75 6e 64 20 |tton bac|kground |
|00003330| 77 69 74 68 20 63 75 72 | 72 65 6e 74 20 62 61 63 |with cur|rent bac|
|00003340| 6b 67 72 6f 75 6e 64 20 | 63 6f 6c 6f 72 17 67 2e |kground |color.g.|
|00003350| 66 6f 72 65 43 6f 6c 6f | 72 20 3d 20 62 61 63 6b |foreColo|r = back|
|00003360| 43 6f 6c 6f 72 1f 67 2e | 66 69 6c 6c 52 65 63 74 |Color.g.|fillRect|
|00003370| 28 30 2c 20 30 2c 20 77 | 69 64 74 68 2c 20 68 65 |(0, 0, w|idth, he|
|00003380| 69 67 68 74 29 00 16 27 | 44 72 61 77 69 6e 67 20 |ight)..'|Drawing |
|00003390| 62 75 74 74 6f 6e 20 70 | 75 73 68 65 64 29 67 2e |button p|ushed)g.|
|000033a0| 66 6f 72 65 43 6f 6c 6f | 72 20 3d 20 44 61 72 6b |foreColo|r = Dark|
|000033b0| 42 65 76 65 6c 20 27 52 | 47 42 28 31 33 36 2c 31 |Bevel 'R|GB(136,1|
|000033c0| 33 36 2c 31 33 36 29 1b | 67 2e 64 72 61 77 6c 69 |36,136).|g.drawli|
|000033d0| 6e 65 28 30 2c 20 30 2c | 20 30 2c 20 77 69 64 74 |ne(0, 0,| 0, widt|
|000033e0| 68 29 20 1b 67 2e 64 72 | 61 77 6c 69 6e 65 28 30 |h) .g.dr|awline(0|
|000033f0| 2c 20 30 2c 20 77 69 64 | 74 68 2c 30 20 29 20 2a |, 0, wid|th,0 ) *|
|00003400| 67 2e 66 6f 72 65 43 6f | 6c 6f 72 20 3d 20 6c 69 |g.foreCo|lor = li|
|00003410| 67 68 74 42 65 76 65 6c | 20 27 52 47 42 28 32 35 |ghtBevel| 'RGB(25|
|00003420| 36 2c 32 35 36 2c 32 35 | 36 29 29 67 2e 64 72 61 |6,256,25|6))g.dra|
|00003430| 77 6c 69 6e 65 28 77 69 | 64 74 68 2d 31 2c 20 31 |wline(wi|dth-1, 1|
|00003440| 2c 20 77 69 64 74 68 2d | 31 2c 20 68 65 69 67 68 |, width-|1, heigh|
|00003450| 74 2d 31 29 2a 67 2e 64 | 72 61 77 6c 69 6e 65 28 |t-1)*g.d|rawline(|
|00003460| 31 2c 20 68 65 69 67 68 | 74 2d 31 2c 20 77 69 64 |1, heigh|t-1, wid|
|00003470| 74 68 2d 31 2c 20 68 65 | 69 67 68 74 2d 31 29 00 |th-1, he|ight-1).|
|00003480| 1e 27 73 65 74 74 69 6e | 67 20 66 6f 6e 74 20 74 |.'settin|g font t|
|00003490| 6f 20 64 6f 77 6e 20 70 | 6f 73 69 74 69 6f 6e 18 |o down p|osition.|
|000034a0| 67 2e 66 6f 72 65 43 6f | 6c 6f 72 20 3d 20 74 65 |g.foreCo|lor = te|
|000034b0| 78 74 41 63 74 69 76 65 | 1b 67 2e 54 65 78 74 66 |xtActive|.g.Textf|
|000034c0| 6f 6e 74 20 3d 20 42 75 | 74 74 6f 6e 54 65 78 74 |ont = Bu|ttonText|
|000034d0| 46 6f 6e 74 1b 67 2e 74 | 65 78 74 73 69 7a 65 20 |Font.g.t|extsize |
|000034e0| 3d 20 42 75 74 74 6f 6e | 54 65 78 74 53 69 7a 65 |= Button|TextSize|
|000034f0| 00 39 27 73 65 74 20 64 | 6f 77 6e 20 74 65 78 74 |.9'set d|own text|
|00003500| 20 78 2c 20 79 20 70 6f | 73 69 74 69 6f 6e 20 68 | x, y po|sition h|
|00003510| 65 72 65 20 28 73 68 69 | 66 74 20 6e 6f 72 6d 61 |ere (shi|ft norma|
|00003520| 6c 20 32 20 70 69 78 65 | 6c 73 29 28 67 2e 64 72 |l 2 pixe|ls)(g.dr|
|00003530| 61 77 73 74 72 69 6e 67 | 20 63 61 70 74 69 6f 6e |awstring| caption|
|00003540| 2c 20 67 65 74 58 20 2b | 20 32 2c 20 67 65 74 59 |, getX +| 2, getY|
|00003550| 20 2b 20 32 00 1e 27 64 | 72 61 77 69 6e 67 20 69 | + 2..'d|rawing i|
|00003560| 63 6f 6e 20 69 6e 20 63 | 6f 72 72 65 63 74 20 73 |con in c|orrect s|
|00003570| 74 61 74 65 0a 64 72 61 | 77 49 63 6f 6e 28 29 00 |tate.dra|wIcon().|
|00003580| 1f 27 64 72 61 77 69 6e | 67 20 61 72 72 6f 77 20 |.'drawin|g arrow |
|00003590| 69 6e 20 63 6f 72 72 65 | 63 74 20 73 74 61 74 65 |in corre|ct state|
|000035a0| 0c 64 72 61 77 41 72 72 | 6f 77 28 67 29 00 23 27 |.drawArr|ow(g).#'|
|000035b0| 64 72 61 77 69 6e 67 20 | 70 69 63 74 75 72 65 20 |drawing |picture |
|000035c0| 28 62 75 74 74 6f 6e 29 | 20 6f 6e 20 43 61 6e 76 |(button)| on Canv|
|000035d0| 61 73 21 67 72 61 70 68 | 69 63 73 2e 64 72 61 77 |as!graph|ics.draw|
|000035e0| 50 69 63 74 75 72 65 20 | 62 75 66 66 65 72 2c 20 |Picture |buffer, |
|000035f0| 30 2c 20 30 00 00 06 65 | 6e 64 20 69 66 07 45 6e |0, 0...e|nd if.En|
|00003600| 64 20 53 75 62 09 73 65 | 74 43 6f 6c 6f 72 73 00 |d Sub.se|tColors.|
|00003610| 00 00 0c 06 0c 06 35 0f | 53 75 62 20 73 65 74 43 |......5.|Sub setC|
|00003620| 6f 6c 6f 72 73 28 29 14 | 64 69 6d 20 72 20 61 73 |olors().|dim r as|
|00003630| 20 6d 65 6d 6f 72 79 42 | 6c 6f 63 6b 20 64 69 6d | memoryB|lock dim|
|00003640| 20 69 2c 20 64 65 70 74 | 68 2c 20 76 65 72 73 69 | i, dept|h, versi|
|00003650| 6f 6e 20 61 73 20 69 6e | 74 65 67 65 72 00 27 69 |on as in|teger.'i|
|00003660| 66 20 73 79 73 74 65 6d | 2e 67 65 73 74 61 6c 74 |f system|.gestalt|
|00003670| 28 22 73 79 73 76 22 2c | 20 76 65 72 73 69 6f 6e |("sysv",| version|
|00003680| 29 20 74 68 65 6e 00 16 | 69 66 20 76 65 72 73 69 |) then..|if versi|
|00003690| 6f 6e 20 3c 20 32 31 32 | 38 20 74 68 65 6e 10 53 |on < 212|8 then.S|
|000036a0| 74 61 6e 64 61 72 64 43 | 6f 6c 6f 72 73 28 29 06 |tandardC|olors().|
|000036b0| 72 65 74 75 72 6e 06 65 | 6e 64 20 69 66 04 65 6c |return.e|nd if.el|
|000036c0| 73 65 10 53 74 61 6e 64 | 61 72 64 43 6f 6c 6f 72 |se.Stand|ardColor|
|000036d0| 73 28 29 06 72 65 74 75 | 72 6e 87 01 65 6e 64 20 |s().retu|rn..end |
|000036e0| 69 66 20 27 63 68 65 63 | 6b 20 69 66 20 72 75 6e |if 'chec|k if run|
|000036f0| 6e 69 6e 67 20 38 2e 35 | 20 6f 72 20 67 72 65 61 |ning 8.5| or grea|
|00003700| 74 65 72 2c 20 69 66 20 | 6e 6f 74 2c 20 64 72 61 |ter, if |not, dra|
|00003710| 77 69 6e 67 20 6e 6f 72 | 6d 61 6c 20 62 75 74 74 |wing nor|mal butt|
|00003720| 6f 6e 73 00 95 02 44 65 | 63 6c 61 72 65 20 46 75 |ons...De|clare Fu|
|00003730| 6e 63 74 69 6f 6e 20 47 | 65 74 54 68 65 6d 65 42 |nction G|etThemeB|
|00003740| 72 75 73 68 41 73 43 6f | 6c 6f 72 20 4c 69 62 20 |rushAsCo|lor Lib |
|00003750| 22 41 70 70 65 61 72 61 | 6e 63 65 4c 69 62 22 20 |"Appeara|nceLib" |
|00003760| 28 69 6e 42 72 75 73 68 | 20 61 73 20 49 6e 74 65 |(inBrush| as Inte|
|00003770| 67 65 72 2c 20 69 6e 44 | 65 70 74 68 20 61 73 20 |ger, inD|epth as |
|00003780| 49 6e 74 65 67 65 72 2c | 20 69 6e 43 6f 6c 6f 72 |Integer,| inColor|
|00003790| 44 65 76 20 61 73 20 49 | 6e 74 65 67 65 72 2c 20 |Dev as I|nteger, |
|000037a0| 6f 75 74 43 6f 6c 6f 72 | 20 61 73 20 50 74 72 29 |outColor| as Ptr)|
|000037b0| 20 61 73 20 49 6e 74 65 | 67 65 72 92 02 44 65 63 | as Inte|ger..Dec|
|000037c0| 6c 61 72 65 20 46 75 6e | 63 74 69 6f 6e 20 47 65 |lare Fun|ction Ge|
|000037d0| 74 54 68 65 6d 65 54 65 | 78 74 43 6f 6c 6f 72 20 |tThemeTe|xtColor |
|000037e0| 4c 69 62 20 22 41 70 70 | 65 61 72 61 6e 63 65 4c |Lib "App|earanceL|
|000037f0| 69 62 22 20 28 69 6e 43 | 6f 6c 6f 72 20 61 73 20 |ib" (inC|olor as |
|00003800| 49 6e 74 65 67 65 72 2c | 20 69 6e 44 65 70 74 68 |Integer,| inDepth|
|00003810| 20 61 73 20 49 6e 74 65 | 67 65 72 2c 20 69 6e 43 | as Inte|ger, inC|
|00003820| 6f 6c 6f 72 44 65 76 20 | 61 73 20 49 6e 74 65 67 |olorDev |as Integ|
|00003830| 65 72 2c 20 6f 75 74 43 | 6f 6c 6f 72 20 61 73 20 |er, outC|olor as |
|00003840| 50 74 72 29 20 61 73 20 | 49 6e 74 65 67 65 72 00 |Ptr) as |Integer.|
|00003850| 15 72 20 3d 20 6e 65 77 | 4d 65 6d 6f 72 79 42 6c |.r = new|MemoryBl|
|00003860| 6f 63 6b 28 39 29 17 64 | 65 70 74 68 20 3d 20 73 |ock(9).d|epth = s|
|00003870| 63 72 65 65 6e 28 30 29 | 2e 64 65 70 74 68 00 18 |creen(0)|.depth..|
|00003880| 27 67 65 74 74 69 6e 67 | 20 62 65 76 65 6c 20 63 |'getting| bevel c|
|00003890| 6f 6c 6f 72 73 20 20 20 | 29 69 20 3d 20 47 65 74 |olors |)i = Get|
|000038a0| 54 68 65 6d 65 42 72 75 | 73 68 41 73 43 6f 6c 6f |ThemeBru|shAsColo|
|000038b0| 72 28 34 34 2c 20 64 65 | 70 74 68 2c 20 31 2c 20 |r(44, de|pth, 1, |
|000038c0| 72 29 31 6c 69 67 68 74 | 42 65 76 65 6c 20 3d 20 |r)1light|Bevel = |
|000038d0| 72 67 62 28 72 2e 62 79 | 74 65 28 30 29 2c 20 72 |rgb(r.by|te(0), r|
|000038e0| 2e 62 79 74 65 28 32 29 | 2c 20 72 2e 62 79 74 65 |.byte(2)|, r.byte|
|000038f0| 28 34 29 29 00 2c 69 20 | 3d 20 47 65 74 54 68 65 |(4)).,i |= GetThe|
|00003900| 6d 65 42 72 75 73 68 41 | 73 43 6f 6c 6f 72 28 34 |meBrushA|sColor(4|
|00003910| 35 2c 20 64 65 70 74 68 | 2c 20 31 2c 20 72 29 20 |5, depth|, 1, r) |
|00003920| 20 20 30 64 61 72 6b 42 | 65 76 65 6c 20 3d 20 72 | 0darkB|evel = r|
|00003930| 67 62 28 72 2e 62 79 74 | 65 28 30 29 2c 20 72 2e |gb(r.byt|e(0), r.|
|00003940| 62 79 74 65 28 32 29 2c | 20 72 2e 62 79 74 65 28 |byte(2),| r.byte(|
|00003950| 34 29 29 00 1a 27 67 65 | 74 74 69 6e 67 20 61 63 |4))..'ge|tting ac|
|00003960| 74 69 76 65 20 74 65 78 | 74 20 63 6f 6c 6f 72 26 |tive tex|t color&|
|00003970| 69 20 3d 20 47 65 74 54 | 68 65 6d 65 54 65 78 74 |i = GetT|hemeText|
|00003980| 43 6f 6c 6f 72 28 31 32 | 2c 20 64 65 70 74 68 2c |Color(12|, depth,|
|00003990| 20 31 2c 20 72 29 30 74 | 65 78 74 41 63 74 69 76 | 1, r)0t|extActiv|
|000039a0| 65 20 3d 72 67 62 28 72 | 2e 62 79 74 65 28 30 29 |e =rgb(r|.byte(0)|
|000039b0| 2c 20 72 2e 62 79 74 65 | 28 32 29 2c 20 72 2e 62 |, r.byte|(2), r.b|
|000039c0| 79 74 65 28 34 29 29 00 | 1c 27 67 65 74 74 69 6e |yte(4)).|.'gettin|
|000039d0| 67 20 64 69 73 61 62 6c | 65 64 20 63 6f 6c 6f 72 |g disabl|ed color|
|000039e0| 20 74 65 78 74 26 69 20 | 3d 20 47 65 74 54 68 65 | text&i |= GetThe|
|000039f0| 6d 65 54 65 78 74 43 6f | 6c 6f 72 28 31 33 2c 20 |meTextCo|lor(13, |
|00003a00| 64 65 70 74 68 2c 20 31 | 2c 20 72 29 33 74 65 78 |depth, 1|, r)3tex|
|00003a10| 74 44 69 73 61 62 6c 65 | 64 20 3d 20 72 67 62 28 |tDisable|d = rgb(|
|00003a20| 72 2e 62 79 74 65 28 30 | 29 2c 20 72 2e 62 79 74 |r.byte(0|), r.byt|
|00003a30| 65 28 32 29 2c 20 72 2e | 62 79 74 65 28 34 29 29 |e(2), r.|byte(4))|
|00003a40| 00 19 27 67 65 74 74 69 | 6e 67 20 62 61 63 6b 67 |..'getti|ng backg|
|00003a50| 72 6f 75 6e 64 20 63 6f | 6c 6f 72 28 69 20 3d 20 |round co|lor(i = |
|00003a60| 47 65 74 54 68 65 6d 65 | 42 72 75 73 68 41 73 43 |GetTheme|BrushAsC|
|00003a70| 6f 6c 6f 72 28 31 2c 20 | 64 65 70 74 68 2c 20 31 |olor(1, |depth, 1|
|00003a80| 2c 20 72 29 30 42 61 63 | 6b 43 6f 6c 6f 72 20 3d |, r)0Bac|kColor =|
|00003a90| 20 72 67 62 28 72 2e 62 | 79 74 65 28 30 29 2c 20 | rgb(r.b|yte(0), |
|00003aa0| 72 2e 62 79 74 65 28 32 | 29 2c 20 72 2e 62 79 74 |r.byte(2|), r.byt|
|00003ab0| 65 28 34 29 29 00 22 27 | 67 65 74 74 69 6e 67 20 |e(4))."'|getting |
|00003ac0| 64 69 73 61 62 6c 65 64 | 20 62 61 63 6b 67 72 6f |disabled| backgro|
|00003ad0| 75 6e 64 20 63 6f 6c 6f | 72 28 69 20 3d 20 47 65 |und colo|r(i = Ge|
|00003ae0| 74 54 68 65 6d 65 42 72 | 75 73 68 41 73 43 6f 6c |tThemeBr|ushAsCol|
|00003af0| 6f 72 28 32 2c 20 64 65 | 70 74 68 2c 20 31 2c 20 |or(2, de|pth, 1, |
|00003b00| 72 29 38 42 61 63 6b 43 | 6f 6c 6f 72 44 69 73 61 |r)8BackC|olorDisa|
|00003b10| 62 6c 65 64 20 3d 20 72 | 67 62 28 72 2e 62 79 74 |bled = r|gb(r.byt|
|00003b20| 65 28 30 29 2c 20 72 2e | 62 79 74 65 28 32 29 2c |e(0), r.|byte(2),|
|00003b30| 20 72 2e 62 79 74 65 28 | 34 29 29 00 0e 69 66 20 | r.byte(|4))..if |
|00003b40| 69 20 3c 3e 20 30 20 74 | 68 65 6e 87 01 6d 73 67 |i <> 0 t|hen..msg|
|00003b50| 42 6f 78 20 22 45 72 72 | 6f 72 20 69 6e 20 4e 69 |Box "Err|or in Ni|
|00003b60| 6c 4f 62 6a 65 63 74 20 | 4d 53 43 61 6e 76 61 73 |lObject |MSCanvas|
|00003b70| 57 69 74 68 50 69 63 20 | 63 6c 61 73 73 20 77 68 |WithPic |class wh|
|00003b80| 69 6c 65 20 67 65 74 74 | 69 6e 67 20 63 6f 6c 6f |ile gett|ing colo|
|00003b90| 72 73 2e 22 04 71 75 69 | 74 06 65 6e 64 20 69 66 |rs.".qui|t.end if|
|00003ba0| 00 13 65 78 63 65 70 74 | 69 6f 6e 20 6e 69 6c 4f |..except|ion nilO|
|00003bb0| 62 6a 65 63 74 87 01 6d | 73 67 42 6f 78 20 22 45 |bject..m|sgBox "E|
|00003bc0| 72 72 6f 72 20 69 6e 20 | 4e 69 6c 4f 62 6a 65 63 |rror in |NilObjec|
|00003bd0| 74 20 4d 53 43 61 6e 76 | 61 73 57 69 74 68 50 69 |t MSCanv|asWithPi|
|00003be0| 63 20 63 6c 61 73 73 20 | 77 68 69 6c 65 20 67 65 |c class |while ge|
|00003bf0| 74 74 69 6e 67 20 63 6f | 6c 6f 72 73 2e 22 04 71 |tting co|lors.".q|
|00003c00| 75 69 74 07 45 6e 64 20 | 53 75 62 06 6e 6f 72 6d |uit.End |Sub.norm|
|00003c10| 61 6c 00 00 00 27 00 27 | 00 2d 0c 53 75 62 20 6e |al...'.'|.-.Sub n|
|00003c20| 6f 72 6d 61 6c 28 29 00 | 14 27 63 68 65 63 6b 69 |ormal().|.'checki|
|00003c30| 6e 67 20 69 66 20 61 63 | 74 69 76 65 20 13 69 66 |ng if ac|tive .if|
|00003c40| 20 6e 6f 74 20 65 6e 61 | 62 6c 65 64 20 74 68 65 | not ena|bled the|
|00003c50| 6e 0d 45 6e 61 62 6c 65 | 28 66 61 6c 73 65 29 06 |n.Enable|(false).|
|00003c60| 72 65 74 75 72 6e 06 65 | 6e 64 20 69 66 00 3b 27 |return.e|nd if.;'|
|00003c70| 77 68 65 6e 20 62 75 74 | 74 6f 6e 20 69 73 20 73 |when but|ton is s|
|00003c80| 68 6f 77 6e 20 69 6e 20 | 74 68 65 20 6e 6f 72 6d |hown in |the norm|
|00003c90| 61 6c 20 73 74 61 74 65 | 2c 20 63 75 72 73 6f 72 |al state|, cursor|
|00003ca0| 20 69 73 20 6e 6f 72 6d | 61 6c 15 61 70 70 2e 6d | is norm|al.app.m|
|00003cb0| 6f 75 73 65 43 75 72 73 | 6f 72 20 3d 20 6e 69 6c |ouseCurs|or = nil|
|00003cc0| 00 3c 27 64 72 61 77 69 | 6e 67 20 70 69 63 74 75 |.<'drawi|ng pictu|
|00003cd0| 72 65 20 6f 66 66 2d 73 | 63 72 65 65 6e 20 62 65 |re off-s|creen be|
|00003ce0| 66 6f 72 65 20 73 65 74 | 74 69 6e 67 20 70 69 63 |fore set|ting pic|
|00003cf0| 74 75 72 65 20 6f 6e 20 | 43 61 6e 76 61 73 33 62 |ture on |Canvas3b|
|00003d00| 75 66 66 65 72 20 3d 20 | 6e 65 77 50 69 63 74 75 |uffer = |newPictu|
|00003d10| 72 65 28 77 69 64 74 68 | 2c 20 68 65 69 67 68 74 |re(width|, height|
|00003d20| 2c 20 73 63 72 65 65 6e | 28 30 29 2e 64 65 70 74 |, screen|(0).dept|
|00003d30| 68 29 13 67 20 3d 20 62 | 75 66 66 65 72 2e 67 72 |h).g = b|uffer.gr|
|00003d40| 61 70 68 69 63 73 00 3c | 27 66 69 6c 6c 69 6e 67 |aphics.<|'filling|
|00003d50| 20 74 68 65 20 62 75 74 | 74 6f 6e 20 62 61 63 6b | the but|ton back|
|00003d60| 67 72 6f 75 6e 64 20 77 | 69 74 68 20 63 75 72 72 |ground w|ith curr|
|00003d70| 65 6e 74 20 62 61 63 6b | 67 72 6f 75 6e 64 20 63 |ent back|ground c|
|00003d80| 6f 6c 6f 72 17 67 2e 66 | 6f 72 65 43 6f 6c 6f 72 |olor.g.f|oreColor|
|00003d90| 20 3d 20 62 61 63 6b 43 | 6f 6c 6f 72 1f 67 2e 66 | = backC|olor.g.f|
|00003da0| 69 6c 6c 52 65 63 74 28 | 30 2c 20 30 2c 20 77 69 |illRect(|0, 0, wi|
|00003db0| 64 74 68 2c 20 68 65 69 | 67 68 74 29 00 0e 27 64 |dth, hei|ght)..'d|
|00003dc0| 72 61 77 69 6e 67 20 74 | 65 78 74 20 18 67 2e 66 |rawing t|ext .g.f|
|00003dd0| 6f 72 65 43 6f 6c 6f 72 | 20 3d 20 74 65 78 74 41 |oreColor| = textA|
|00003de0| 63 74 69 76 65 1b 67 2e | 54 65 78 74 66 6f 6e 74 |ctive.g.|Textfont|
|00003df0| 20 3d 20 42 75 74 74 6f | 6e 54 65 78 74 46 6f 6e | = Butto|nTextFon|
|00003e00| 74 1b 67 2e 74 65 78 74 | 73 69 7a 65 20 3d 20 42 |t.g.text|size = B|
|00003e10| 75 74 74 6f 6e 54 65 78 | 74 53 69 7a 65 23 27 73 |uttonTex|tSize#'s|
|00003e20| 65 74 20 6e 6f 72 6d 61 | 6c 20 74 65 78 74 20 78 |et norma|l text x|
|00003e30| 2c 20 79 20 70 6f 73 69 | 74 69 6f 6e 20 68 65 72 |, y posi|tion her|
|00003e40| 65 00 12 27 4f 75 74 6c | 6f 6f 6b 20 73 74 61 6e |e..'Outl|ook stan|
|00003e50| 64 61 72 64 73 19 27 20 | 78 20 77 69 74 68 20 69 |dards.' |x with i|
|00003e60| 63 6f 6e 20 2d 20 32 33 | 20 70 69 78 65 6c 73 18 |con - 23| pixels.|
|00003e70| 27 79 20 77 69 74 68 20 | 69 63 6f 6e 20 2d 20 31 |'y with |icon - 1|
|00003e80| 35 20 70 69 78 65 6c 73 | 24 27 36 20 70 69 78 65 |5 pixels|$'6 pixe|
|00003e90| 6c 73 20 62 69 67 67 65 | 72 20 74 68 65 6e 20 77 |ls bigge|r then w|
|00003ea0| 69 64 74 68 20 6f 6e 20 | 72 69 67 68 74 1c 27 32 |idth on |right.'2|
|00003eb0| 33 20 70 69 78 65 6c 73 | 20 77 69 74 68 20 69 63 |3 pixels| with ic|
|00003ec0| 6f 6e 20 6f 6e 20 6c 65 | 66 74 12 27 36 20 77 69 |on on le|ft.'6 wi|
|00003ed0| 74 68 6f 75 74 20 6f 6e | 20 6c 65 66 74 00 20 67 |thout on| left. g|
|00003ee0| 2e 64 72 61 77 73 74 72 | 69 6e 67 20 63 61 70 74 |.drawstr|ing capt|
|00003ef0| 69 6f 6e 2c 20 67 65 74 | 58 2c 20 67 65 74 59 00 |ion, get|X, getY.|
|00003f00| 1e 27 64 72 61 77 69 6e | 67 20 69 63 6f 6e 20 69 |.'drawin|g icon i|
|00003f10| 6e 20 63 6f 72 72 65 63 | 74 20 73 74 61 74 65 0a |n correc|t state.|
|00003f20| 44 72 61 77 49 63 6f 6e | 28 29 00 1f 27 64 72 61 |DrawIcon|()..'dra|
|00003f30| 77 69 6e 67 20 61 72 72 | 6f 77 20 69 6e 20 63 6f |wing arr|ow in co|
|00003f40| 72 72 65 63 74 20 73 74 | 61 74 65 0c 44 72 61 77 |rrect st|ate.Draw|
|00003f50| 41 72 72 6f 77 28 67 29 | 00 23 27 64 72 61 77 69 |Arrow(g)|.#'drawi|
|00003f60| 6e 67 20 70 69 63 74 75 | 72 65 20 28 62 75 74 74 |ng pictu|re (butt|
|00003f70| 6f 6e 29 20 6f 6e 20 43 | 61 6e 76 61 73 21 67 72 |on) on C|anvas!gr|
|00003f80| 61 70 68 69 63 73 2e 64 | 72 61 77 50 69 63 74 75 |aphics.d|rawPictu|
|00003f90| 72 65 20 62 75 66 66 65 | 72 2c 20 30 2c 20 30 00 |re buffe|r, 0, 0.|
|00003fa0| 00 07 45 6e 64 20 53 75 | 62 0e 73 74 61 6e 64 61 |..End Su|b.standa|
|00003fb0| 72 64 43 6f 6c 6f 72 73 | 00 00 00 06 0c 06 0c 0b |rdColors|........|
|00003fc0| 14 53 75 62 20 73 74 61 | 6e 64 61 72 64 43 6f 6c |.Sub sta|ndardCol|
|00003fd0| 6f 72 73 28 29 3d 27 73 | 65 74 74 69 6e 67 20 76 |ors()='s|etting v|
|00003fe0| 61 72 73 20 74 6f 20 73 | 74 61 6e 64 61 72 64 20 |ars to s|tandard |
|00003ff0| 63 6f 6c 6f 72 73 20 69 | 66 20 6e 6f 74 20 72 75 |colors i|f not ru|
|00004000| 6e 6e 69 6e 67 20 38 2e | 35 20 6f 72 20 68 69 67 |nning 8.|5 or hig|
|00004010| 68 65 72 00 1d 6c 69 67 | 68 74 42 65 76 65 6c 20 |her..lig|htBevel |
|00004020| 3d 20 72 67 62 28 32 35 | 36 2c 32 35 36 2c 32 35 |= rgb(25|6,256,25|
|00004030| 36 29 1c 64 61 72 6b 42 | 65 76 65 6c 20 3d 20 72 |6).darkB|evel = r|
|00004040| 67 62 28 31 33 36 2c 31 | 33 36 2c 31 33 36 29 16 |gb(136,1|36,136).|
|00004050| 74 65 78 74 41 63 74 69 | 76 65 20 3d 20 74 65 78 |textActi|ve = tex|
|00004060| 74 43 6f 6c 6f 72 21 74 | 65 78 74 44 69 73 61 62 |tColor!t|extDisab|
|00004070| 6c 65 64 20 3d 20 72 67 | 62 28 31 31 35 2c 20 31 |led = rg|b(115, 1|
|00004080| 31 35 2c 20 31 31 35 29 | 15 42 61 63 6b 43 6f 6c |15, 115)|.BackCol|
|00004090| 6f 72 20 3d 20 66 69 6c | 6c 43 6f 6c 6f 72 1d 42 |or = fil|lColor.B|
|000040a0| 61 63 6b 43 6f 6c 6f 72 | 44 69 73 61 62 6c 65 64 |ackColor|Disabled|
|000040b0| 20 3d 20 66 69 6c 6c 43 | 6f 6c 6f 72 00 07 45 6e | = fillC|olor..En|
|000040c0| 64 20 53 75 62 08 64 72 | 61 77 49 63 6f 6e 00 00 |d Sub.dr|awIcon..|
|000040d0| 00 05 0d 05 0d 16 0e 53 | 75 62 20 64 72 61 77 49 |.......S|ub drawI|
|000040e0| 63 6f 6e 28 29 1c 64 69 | 6d 20 77 69 64 74 68 2c |con().di|m width,|
|000040f0| 20 68 65 69 67 68 74 20 | 61 73 20 69 6e 74 65 67 | height |as integ|
|00004100| 65 72 18 77 69 64 74 68 | 20 3d 20 70 69 63 74 4e |er.width| = pictN|
|00004110| 6f 72 6d 61 6c 2e 77 69 | 64 74 68 1a 68 65 69 67 |ormal.wi|dth.heig|
|00004120| 68 74 20 3d 20 70 69 63 | 74 4e 6f 72 6d 61 6c 2e |ht = pic|tNormal.|
|00004130| 68 65 69 67 68 74 00 0d | 27 64 72 61 77 69 6e 67 |height..|'drawing|
|00004140| 20 69 63 6f 6e 19 69 66 | 20 6d 65 2e 65 6e 61 62 | icon.if| me.enab|
|00004150| 6c 65 64 20 3d 20 74 72 | 75 65 20 74 68 65 6e 00 |led = tr|ue then.|
|00004160| 24 69 66 20 6d 65 2e 73 | 74 61 74 65 20 3d 20 30 |$if me.s|tate = 0|
|00004170| 20 6f 72 20 6d 65 2e 73 | 74 61 74 65 20 3d 20 31 | or me.s|tate = 1|
|00004180| 20 74 68 65 6e 14 27 75 | 70 20 61 6e 64 20 6e 6f | then.'u|p and no|
|00004190| 72 6d 61 6c 20 73 74 61 | 74 65 3a 50 44 72 61 77 |rmal sta|te:PDraw|
|000041a0| 43 49 43 4e 28 52 65 73 | 49 63 6f 6e 49 44 2c 20 |CICN(Res|IconID, |
|000041b0| 33 2c 20 67 65 74 50 69 | 63 74 59 2c 20 77 69 64 |3, getPi|ctY, wid|
|000041c0| 74 68 2c 20 68 65 69 67 | 68 74 2c 20 30 2c 20 66 |th, heig|ht, 0, f|
|000041d0| 61 6c 73 65 29 04 65 6c | 73 65 0b 27 64 6f 77 6e |alse).el|se.'down|
|000041e0| 20 73 74 61 74 65 3c 50 | 44 72 61 77 43 49 43 4e | state<P|DrawCICN|
|000041f0| 28 52 65 73 49 63 6f 6e | 49 44 2c 20 35 2c 20 67 |(ResIcon|ID, 5, g|
|00004200| 65 74 50 69 63 74 59 2b | 20 32 2c 20 77 69 64 74 |etPictY+| 2, widt|
|00004210| 68 2c 20 68 65 69 67 68 | 74 2c 20 30 2c 20 74 72 |h, heigh|t, 0, tr|
|00004220| 75 65 29 06 65 6e 64 20 | 69 66 00 04 65 6c 73 65 |ue).end |if..else|
|00004230| 0f 27 64 69 73 61 62 6c | 65 64 20 73 74 61 74 65 |.'disabl|ed state|
|00004240| 39 50 44 72 61 77 43 49 | 43 4e 28 52 65 73 49 63 |9PDrawCI|CN(ResIc|
|00004250| 6f 6e 49 44 2c 20 33 2c | 20 67 65 74 50 69 63 74 |onID, 3,| getPict|
|00004260| 59 2c 77 69 64 74 68 2c | 20 68 65 69 67 68 74 2c |Y,width,| height,|
|00004270| 20 31 2c 20 66 61 6c 73 | 65 29 06 65 6e 64 20 69 | 1, fals|e).end i|
|00004280| 66 00 07 45 6e 64 20 53 | 75 62 09 50 44 72 61 77 |f..End S|ub.PDraw|
|00004290| 43 49 43 4e b9 01 69 64 | 20 61 73 20 69 6e 74 65 |CICN..id| as inte|
|000042a0| 67 65 72 2c 20 6c 65 66 | 74 20 61 73 20 69 6e 74 |ger, lef|t as int|
|000042b0| 65 67 65 72 2c 20 74 6f | 70 20 61 73 20 69 6e 74 |eger, to|p as int|
|000042c0| 65 67 65 72 2c 20 77 69 | 64 74 68 20 61 73 20 69 |eger, wi|dth as i|
|000042d0| 6e 74 65 67 65 72 2c 20 | 68 65 69 67 68 74 20 61 |nteger, |height a|
|000042e0| 73 20 69 6e 74 65 67 65 | 72 2c 20 6d 6f 64 65 20 |s intege|r, mode |
|000042f0| 61 73 20 69 6e 74 65 67 | 65 72 2c 20 73 65 6c 65 |as integ|er, sele|
|00004300| 63 74 65 64 20 61 73 20 | 62 6f 6f 6c 65 61 6e 00 |cted as |boolean.|
|00004310| 00 36 06 36 06 38 88 02 | 53 75 62 20 50 44 72 61 |.6.6.8..|Sub PDra|
|00004320| 77 43 49 43 4e 28 69 64 | 20 61 73 20 69 6e 74 65 |wCICN(id| as inte|
|00004330| 67 65 72 2c 20 6c 65 66 | 74 20 61 73 20 69 6e 74 |ger, lef|t as int|
|00004340| 65 67 65 72 2c 20 74 6f | 70 20 61 73 20 69 6e 74 |eger, to|p as int|
|00004350| 65 67 65 72 2c 20 77 69 | 64 74 68 20 61 73 20 69 |eger, wi|dth as i|
|00004360| 6e 74 65 67 65 72 2c 20 | 68 65 69 67 68 74 20 61 |nteger, |height a|
|00004370| 73 20 69 6e 74 65 67 65 | 72 2c 20 6d 6f 64 65 20 |s intege|r, mode |
|00004380| 61 73 20 69 6e 74 65 67 | 65 72 2c 20 73 65 6c 65 |as integ|er, sele|
|00004390| 63 74 65 64 20 61 73 20 | 62 6f 6f 6c 65 61 6e 29 |cted as |boolean)|
|000043a0| 00 93 01 64 65 63 6c 61 | 72 65 20 66 75 6e 63 74 |...decla|re funct|
|000043b0| 69 6f 6e 20 47 65 74 43 | 49 63 6f 6e 20 6c 69 62 |ion GetC|Icon lib|
|000043c0| 20 22 49 6e 74 65 72 66 | 61 63 65 4c 69 62 22 20 | "Interf|aceLib" |
|000043d0| 28 69 64 20 61 73 20 73 | 68 6f 72 74 29 20 61 73 |(id as s|hort) as|
|000043e0| 20 70 74 72 20 49 6e 6c | 69 6e 65 36 38 4b 28 22 | ptr Inl|ine68K("|
|000043f0| 41 41 31 45 22 29 97 02 | 64 65 63 6c 61 72 65 20 |AA1E")..|declare |
|00004400| 66 75 6e 63 74 69 6f 6e | 20 50 6c 6f 74 43 49 63 |function| PlotCIc|
|00004410| 6f 6e 48 61 6e 64 6c 65 | 20 6c 69 62 20 22 49 6e |onHandle| lib "In|
|00004420| 74 65 72 66 61 63 65 4c | 69 62 22 20 28 72 65 63 |terfaceL|ib" (rec|
|00004430| 74 20 61 73 20 70 74 72 | 2c 20 61 6c 69 67 6e 20 |t as ptr|, align |
|00004440| 61 73 20 73 68 6f 72 74 | 2c 20 74 72 61 6e 73 66 |as short|, transf|
|00004450| 6f 72 6d 20 61 73 20 73 | 68 6f 72 74 2c 20 69 63 |orm as s|hort, ic|
|00004460| 6f 6e 20 61 73 20 70 74 | 72 29 20 61 73 20 69 6e |on as pt|r) as in|
|00004470| 74 65 67 65 72 20 49 6e | 6c 69 6e 65 36 38 4b 28 |teger In|line68K(|
|00004480| 22 33 30 33 43 30 36 31 | 46 41 42 43 39 22 29 8d |"303C061|FABC9").|
|00004490| 01 64 65 63 6c 61 72 65 | 20 73 75 62 20 44 69 73 |.declare| sub Dis|
|000044a0| 70 6f 73 65 43 49 63 6f | 6e 20 6c 69 62 20 22 49 |poseCIco|n lib "I|
|000044b0| 6e 74 65 72 66 61 63 65 | 4c 69 62 22 20 28 68 61 |nterface|Lib" (ha|
|000044c0| 6e 64 6c 65 20 61 73 20 | 70 74 72 29 20 49 6e 6c |ndle as |ptr) Inl|
|000044d0| 69 6e 65 36 38 4b 28 22 | 41 41 32 35 22 29 00 20 |ine68K("|AA25"). |
|000044e0| 64 69 6d 20 68 61 6e 64 | 6c 65 2c 6e 69 6c 70 74 |dim hand|le,nilpt|
|000044f0| 72 20 61 73 20 4d 65 6d | 6f 72 79 42 6c 6f 63 6b |r as Mem|oryBlock|
|00004500| 1c 64 69 6d 20 74 72 61 | 6e 73 66 6f 72 6d 2c 65 |.dim tra|nsform,e|
|00004510| 72 72 20 61 73 20 69 6e | 74 65 67 65 72 17 64 69 |rr as in|teger.di|
|00004520| 6d 20 72 65 63 74 20 61 | 73 20 4d 65 6d 6f 72 79 |m rect a|s Memory|
|00004530| 42 6c 6f 63 6b 00 1a 6e | 69 6c 70 74 72 20 3d 20 |Block..n|ilptr = |
|00004540| 4e 65 77 4d 65 6d 6f 72 | 79 42 6c 6f 63 6b 28 34 |NewMemor|yBlock(4|
|00004550| 29 15 68 61 6e 64 6c 65 | 20 3d 20 47 65 74 43 49 |).handle| = GetCI|
|00004560| 63 6f 6e 28 69 64 29 00 | 20 69 66 20 28 68 61 6e |con(id).| if (han|
|00004570| 64 6c 65 20 3d 20 6e 69 | 6c 70 74 72 2e 70 74 72 |dle = ni|lptr.ptr|
|00004580| 28 30 29 29 20 74 68 65 | 6e 06 72 65 74 75 72 6e |(0)) the|n.return|
|00004590| 06 65 6e 64 20 69 66 00 | 18 72 65 63 74 20 3d 20 |.end if.|.rect = |
|000045a0| 4e 65 77 4d 65 6d 6f 72 | 79 42 6c 6f 63 6b 28 38 |NewMemor|yBlock(8|
|000045b0| 29 13 72 65 63 74 2e 73 | 68 6f 72 74 28 30 29 20 |).rect.s|hort(0) |
|000045c0| 3d 20 74 6f 70 14 72 65 | 63 74 2e 73 68 6f 72 74 |= top.re|ct.short|
|000045d0| 28 32 29 20 3d 20 6c 65 | 66 74 1c 72 65 63 74 2e |(2) = le|ft.rect.|
|000045e0| 73 68 6f 72 74 28 34 29 | 20 3d 20 74 6f 70 20 2b |short(4)| = top +|
|000045f0| 20 68 65 69 67 68 74 1c | 72 65 63 74 2e 73 68 6f | height.|rect.sho|
|00004600| 72 74 28 36 29 20 3d 20 | 6c 65 66 74 20 2b 20 77 |rt(6) = |left + w|
|00004610| 69 64 74 68 00 1d 74 72 | 61 6e 73 66 6f 72 6d 3d |idth..tr|ansform=|
|00004620| 56 61 6c 28 22 26 68 22 | 2b 53 74 72 28 6d 6f 64 |Val("&h"|+Str(mod|
|00004630| 65 29 29 00 10 69 66 20 | 73 65 6c 65 63 74 65 64 |e))..if |selected|
|00004640| 20 74 68 65 6e 1e 74 72 | 61 6e 73 66 6f 72 6d 20 | then.tr|ansform |
|00004650| 3d 20 74 72 61 6e 73 66 | 6f 72 6d 20 2b 20 26 68 |= transf|orm + &h|
|00004660| 34 30 30 30 06 65 6e 64 | 20 69 66 00 17 2f 2f 20 |4000.end| if..// |
|00004670| 56 61 6c 69 64 20 22 6d | 6f 64 65 22 20 76 61 6c |Valid "m|ode" val|
|00004680| 75 65 73 3a 10 2f 2f 20 | 20 20 30 20 3d 20 65 6e |ues:.// | 0 = en|
|00004690| 61 62 6c 65 64 11 2f 2f | 20 20 20 31 20 3d 20 64 |abled.//| 1 = d|
|000046a0| 69 73 61 62 6c 65 64 10 | 2f 2f 20 20 20 32 20 3d |isabled.|// 2 =|
|000046b0| 20 6f 66 66 6c 69 6e 65 | 0d 2f 2f 20 20 20 33 20 | offline|.// 3 |
|000046c0| 3d 20 6f 70 65 6e 14 2f | 2f 20 20 20 34 30 30 30 |= open./|/ 4000|
|000046d0| 20 3d 20 73 65 6c 65 63 | 74 65 64 1e 2f 2f 20 46 | = selec|ted.// F|
|000046e0| 69 6e 64 65 72 20 4c 61 | 62 65 6c 20 22 6d 6f 64 |inder La|bel "mod|
|000046f0| 65 22 20 76 61 6c 75 65 | 73 3a 12 2f 2f 20 20 20 |e" value|s:.// |
|00004700| 31 30 30 20 3d 20 6c 61 | 62 65 6c 20 31 12 2f 2f |100 = la|bel 1.//|
|00004710| 20 20 20 32 30 30 20 3d | 20 6c 61 62 65 6c 20 32 | 200 =| label 2|
|00004720| 12 2f 2f 20 20 20 33 30 | 30 20 3d 20 6c 61 62 65 |.// 30|0 = labe|
|00004730| 6c 20 33 12 2f 2f 20 20 | 20 34 30 30 20 3d 20 6c |l 3.// | 400 = l|
|00004740| 61 62 65 6c 20 34 12 2f | 2f 20 20 20 35 30 30 20 |abel 4./|/ 500 |
|00004750| 3d 20 6c 61 62 65 6c 20 | 35 12 2f 2f 20 20 20 36 |= label |5.// 6|
|00004760| 30 30 20 3d 20 6c 61 62 | 65 6c 20 36 12 2f 2f 20 |00 = lab|el 6.// |
|00004770| 20 20 37 30 30 20 3d 20 | 6c 61 62 65 6c 20 37 8a | 700 = |label 7.|
|00004780| 01 2f 2f 20 4e 6f 74 65 | 3a 20 79 6f 75 20 63 61 |.// Note|: you ca|
|00004790| 6e 20 61 64 64 20 74 68 | 65 73 65 20 76 61 6c 75 |n add th|ese valu|
|000047a0| 65 73 20 74 6f 67 65 74 | 68 65 72 20 74 6f 20 63 |es toget|her to c|
|000047b0| 6f 6d 62 69 6e 65 20 73 | 74 61 74 65 73 2c 20 66 |ombine s|tates, f|
|000047c0| 6f 72 20 65 78 61 6d 70 | 6c 65 3a 26 2f 2f 20 20 |or examp|le:&// |
|000047d0| 20 34 31 30 32 20 3d 20 | 73 65 6c 65 63 74 65 64 | 4102 = |selected|
|000047e0| 2c 20 6c 61 62 65 6c 20 | 31 2c 20 6f 66 66 6c 69 |, label |1, offli|
|000047f0| 6e 65 18 2f 2f 20 20 20 | 33 30 33 20 3d 20 6f 70 |ne.// |303 = op|
|00004800| 65 6e 2c 20 6c 61 62 65 | 6c 20 33 ac 01 2f 2f 20 |en, labe|l 3..// |
|00004810| 4e 6f 74 65 20 32 3a 20 | 6c 61 62 65 6c 73 20 61 |Note 2: |labels a|
|00004820| 72 65 20 69 6e 20 72 65 | 76 65 72 73 65 20 6f 72 |re in re|verse or|
|00004830| 64 65 72 2c 20 69 2e 65 | 2e 20 31 30 30 20 28 6c |der, i.e|. 100 (l|
|00004840| 61 62 65 6c 20 31 29 20 | 69 73 20 74 68 65 20 6c |abel 1) |is the l|
|00004850| 61 73 74 20 6c 61 62 65 | 6c 20 69 6e 20 74 68 65 |ast labe|l in the|
|00004860| 20 46 69 6e 64 65 72 27 | 73 20 22 4c 61 62 65 6c | Finder'|s "Label|
|00004870| 22 20 73 75 62 6d 65 6e | 75 8c 01 2f 2f 20 4e 6f |" submen|u..// No|
|00004880| 74 65 20 33 3a 20 65 69 | 74 68 65 72 20 70 61 73 |te 3: ei|ther pas|
|00004890| 73 20 74 72 75 65 20 66 | 6f 72 20 73 65 6c 65 63 |s true f|or selec|
|000048a0| 74 65 64 20 6f 72 20 61 | 64 64 20 34 30 30 30 20 |ted or a|dd 4000 |
|000048b0| 74 6f 20 6d 6f 64 65 2e | 20 44 6f 6e 27 74 20 64 |to mode.| Don't d|
|000048c0| 6f 20 62 6f 74 68 2e 00 | 31 65 72 72 20 3d 20 50 |o both..|1err = P|
|000048d0| 6c 6f 74 43 49 63 6f 6e | 48 61 6e 64 6c 65 28 72 |lotCIcon|Handle(r|
|000048e0| 65 63 74 2c 20 30 2c 20 | 74 72 61 6e 73 66 6f 72 |ect, 0, |transfor|
|000048f0| 6d 2c 20 68 61 6e 64 6c | 65 29 13 44 69 73 70 6f |m, handl|e).Dispo|
|00004900| 73 65 43 49 63 6f 6e 20 | 68 61 6e 64 6c 65 00 10 |seCIcon |handle..|
|00004910| 69 66 20 65 72 72 20 3c | 3e 20 30 20 74 68 65 6e |if err <|> 0 then|
|00004920| 2e 6d 73 67 42 6f 78 20 | 22 45 72 72 6f 72 20 64 |.msgBox |"Error d|
|00004930| 72 61 77 69 6e 67 20 69 | 63 6f 6e 20 69 6e 20 4d |rawing i|con in M|
|00004940| 53 42 75 74 74 6f 6e 20 | 43 6c 61 73 73 2e 22 06 |SButton |Class.".|
|00004950| 65 6e 64 20 69 66 07 45 | 6e 64 20 53 75 62 09 64 |end if.E|nd Sub.d|
|00004960| 72 61 77 41 72 72 6f 77 | 0d 67 20 61 73 20 67 72 |rawArrow|.g as gr|
|00004970| 61 70 68 69 63 73 00 00 | 01 00 01 00 25 1c 53 75 |aphics..|....%.Su|
|00004980| 62 20 64 72 61 77 41 72 | 72 6f 77 28 67 20 61 73 |b drawAr|row(g as|
|00004990| 20 67 72 61 70 68 69 63 | 73 29 00 13 64 69 6d 20 | graphic|s)..dim |
|000049a0| 78 2c 20 79 20 61 73 20 | 69 6e 74 65 67 65 72 25 |x, y as |integer%|
|000049b0| 78 20 3d 20 67 65 74 58 | 20 2b 20 35 20 2b 20 67 |x = getX| + 5 + g|
|000049c0| 2e 73 74 72 69 6e 67 57 | 69 64 74 68 28 63 61 70 |.stringW|idth(cap|
|000049d0| 74 69 6f 6e 29 0c 79 20 | 3d 20 67 65 74 59 20 2d |tion).y |= getY -|
|000049e0| 20 36 00 13 27 64 72 61 | 77 69 6e 67 20 61 72 72 | 6..'dra|wing arr|
|000049f0| 6f 77 20 69 63 6f 6e 19 | 69 66 20 6d 65 2e 65 6e |ow icon.|if me.en|
|00004a00| 61 62 6c 65 64 20 3d 20 | 74 72 75 65 20 74 68 65 |abled = |true the|
|00004a10| 6e 00 24 69 66 20 6d 65 | 2e 73 74 61 74 65 20 3d |n.$if me|.state =|
|00004a20| 20 30 20 6f 72 20 6d 65 | 2e 73 74 61 74 65 20 3d | 0 or me|.state =|
|00004a30| 20 31 20 74 68 65 6e 14 | 27 75 70 20 61 6e 64 20 | 1 then.|'up and |
|00004a40| 6e 6f 72 6d 61 6c 20 73 | 74 61 74 65 18 67 2e 66 |normal s|tate.g.f|
|00004a50| 6f 72 65 43 6f 6c 6f 72 | 20 3d 20 74 65 78 74 41 |oreColor| = textA|
|00004a60| 63 74 69 76 65 19 67 2e | 64 72 61 77 6c 69 6e 65 |ctive.g.|drawline|
|00004a70| 20 78 2c 20 79 2c 20 78 | 20 2b 20 37 2c 20 79 25 | x, y, x| + 7, y%|
|00004a80| 67 2e 64 72 61 77 6c 69 | 6e 65 20 78 20 2b 20 31 |g.drawli|ne x + 1|
|00004a90| 2c 20 79 20 2b 20 31 2c | 20 78 20 2b 20 36 2c 20 |, y + 1,| x + 6, |
|00004aa0| 79 20 2b 20 31 25 67 2e | 64 72 61 77 6c 69 6e 65 |y + 1%g.|drawline|
|00004ab0| 20 78 20 2b 20 32 2c 20 | 79 20 2b 20 32 2c 20 78 | x + 2, |y + 2, x|
|00004ac0| 20 2b 20 35 2c 20 79 20 | 2b 20 32 25 67 2e 64 72 | + 5, y |+ 2%g.dr|
|00004ad0| 61 77 6c 69 6e 65 20 78 | 20 2b 20 33 2c 20 79 20 |awline x| + 3, y |
|00004ae0| 2b 20 33 2c 20 78 20 2b | 20 34 2c 20 79 20 2b 20 |+ 3, x +| 4, y + |
|00004af0| 33 04 65 6c 73 65 0b 27 | 64 6f 77 6e 20 73 74 61 |3.else.'|down sta|
|00004b00| 74 65 09 79 20 3d 20 79 | 20 2b 20 32 09 78 20 3d |te.y = y| + 2.x =|
|00004b10| 20 78 20 2b 20 32 18 67 | 2e 66 6f 72 65 43 6f 6c | x + 2.g|.foreCol|
|00004b20| 6f 72 20 3d 20 74 65 78 | 74 41 63 74 69 76 65 19 |or = tex|tActive.|
|00004b30| 67 2e 64 72 61 77 6c 69 | 6e 65 20 78 2c 20 79 2c |g.drawli|ne x, y,|
|00004b40| 20 78 20 2b 20 37 2c 20 | 79 25 67 2e 64 72 61 77 | x + 7, |y%g.draw|
|00004b50| 6c 69 6e 65 20 78 20 2b | 20 31 2c 20 79 20 2b 20 |line x +| 1, y + |
|00004b60| 31 2c 20 78 20 2b 20 36 | 2c 20 79 20 2b 20 31 25 |1, x + 6|, y + 1%|
|00004b70| 67 2e 64 72 61 77 6c 69 | 6e 65 20 78 20 2b 20 32 |g.drawli|ne x + 2|
|00004b80| 2c 20 79 20 2b 20 32 2c | 20 78 20 2b 20 35 2c 20 |, y + 2,| x + 5, |
|00004b90| 79 20 2b 20 32 25 67 2e | 64 72 61 77 6c 69 6e 65 |y + 2%g.|drawline|
|00004ba0| 20 78 20 2b 20 33 2c 20 | 79 20 2b 20 33 2c 20 78 | x + 3, |y + 3, x|
|00004bb0| 20 2b 20 34 2c 20 79 20 | 2b 20 33 06 65 6e 64 20 | + 4, y |+ 3.end |
|00004bc0| 69 66 00 04 65 6c 73 65 | 0f 27 64 69 73 61 62 6c |if..else|.'disabl|
|00004bd0| 65 64 20 73 74 61 74 65 | 1a 67 2e 66 6f 72 65 43 |ed state|.g.foreC|
|00004be0| 6f 6c 6f 72 20 3d 20 74 | 65 78 74 44 69 73 61 62 |olor = t|extDisab|
|00004bf0| 6c 65 64 19 67 2e 64 72 | 61 77 6c 69 6e 65 20 78 |led.g.dr|awline x|
|00004c00| 2c 20 79 2c 20 78 20 2b | 20 37 2c 20 79 25 67 2e |, y, x +| 7, y%g.|
|00004c10| 64 72 61 77 6c 69 6e 65 | 20 78 20 2b 20 31 2c 20 |drawline| x + 1, |
|00004c20| 79 20 2b 20 31 2c 20 78 | 20 2b 20 36 2c 20 79 20 |y + 1, x| + 6, y |
|00004c30| 2b 20 31 25 67 2e 64 72 | 61 77 6c 69 6e 65 20 78 |+ 1%g.dr|awline x|
|00004c40| 20 2b 20 32 2c 20 79 20 | 2b 20 32 2c 20 78 20 2b | + 2, y |+ 2, x +|
|00004c50| 20 35 2c 20 79 20 2b 20 | 32 25 67 2e 64 72 61 77 | 5, y + |2%g.draw|
|00004c60| 6c 69 6e 65 20 78 20 2b | 20 33 2c 20 79 20 2b 20 |line x +| 3, y + |
|00004c70| 33 2c 20 78 20 2b 20 34 | 2c 20 79 20 2b 20 33 06 |3, x + 4|, y + 3.|
|00004c80| 65 6e 64 20 69 66 00 07 | 45 6e 64 20 53 75 62 04 |end if..|End Sub.|
|00004c90| 04 4f 70 65 6e 00 00 05 | 43 6c 6f 73 65 00 00 06 |.Open...|Close...|
|00004ca0| 43 68 61 6e 67 65 00 00 | 06 41 63 74 69 6f 6e 00 |Change..|.Action.|
|00004cb0| 00 09 0a 4d 6f 75 73 65 | 45 6e 74 65 72 0e 00 0e |...Mouse|Enter...|
|00004cc0| 00 10 10 53 75 62 20 4d | 6f 75 73 65 45 6e 74 65 |...Sub M|ouseEnte|
|00004cd0| 72 28 29 8e 01 27 49 66 | 20 74 68 65 20 69 6e 44 |r()..'If| the inD|
|00004ce0| 6f 77 6e 20 50 72 6f 70 | 65 72 74 79 20 69 73 20 |own Prop|erty is |
|00004cf0| 74 72 75 65 20 61 6e 64 | 20 74 68 65 20 73 79 73 |true and| the sys|
|00004d00| 74 65 6d 2e 6d 6f 75 73 | 65 64 6f 77 6e 20 69 73 |tem.mous|edown is|
|00004d10| 20 74 72 75 65 2c 20 74 | 68 65 20 75 73 65 72 20 | true, t|he user |
|00004d20| 69 73 20 90 01 27 65 6e | 74 65 72 69 6e 67 20 74 |is ..'en|tering t|
|00004d30| 68 65 20 62 75 74 74 6f | 6e 20 61 66 74 65 72 20 |he butto|n after |
|00004d40| 74 68 65 79 20 64 72 75 | 67 20 6f 66 66 20 6f 66 |they dru|g off of|
|00004d50| 20 74 68 65 20 62 75 74 | 74 6f 6e 2e 20 20 54 68 | the but|ton. Th|
|00004d60| 69 73 20 66 69 72 65 73 | 20 74 68 65 20 73 65 74 |is fires| the set|
|00004d70| 20 64 6f 77 6e 07 27 73 | 74 61 74 65 2e 2d 27 45 | down.'s|tate.-'E|
|00004d80| 6c 73 65 20 73 65 74 74 | 69 6e 67 20 74 68 65 20 |lse sett|ing the |
|00004d90| 74 68 65 20 62 75 74 74 | 6f 6e 20 74 6f 20 74 68 |the butt|on to th|
|00004da0| 65 20 75 70 20 73 74 61 | 74 65 2e 31 69 66 20 69 |e up sta|te.1if i|
|00004db0| 6e 44 6f 77 6e 20 3d 20 | 74 72 75 65 20 61 6e 64 |nDown = |true and|
|00004dc0| 20 73 79 73 74 65 6d 2e | 6d 6f 75 73 65 64 6f 77 | system.|mousedow|
|00004dd0| 6e 20 3d 20 74 72 75 65 | 20 74 68 65 6e 0b 27 64 |n = true| then.'d|
|00004de0| 6f 77 6e 20 73 74 61 74 | 65 09 73 74 61 74 65 20 |own stat|e.state |
|00004df0| 3d 20 32 06 64 6f 77 6e | 28 29 04 65 6c 73 65 03 |= 2.down|().else.|
|00004e00| 27 75 70 09 73 74 61 74 | 65 20 3d 20 31 04 75 70 |'up.stat|e = 1.up|
|00004e10| 28 29 06 65 6e 64 20 69 | 66 00 07 45 6e 64 20 53 |().end i|f..End S|
|00004e20| 75 62 09 4d 6f 75 73 65 | 45 78 69 74 08 00 08 00 |ub.Mouse|Exit....|
|00004e30| 0f 0f 53 75 62 20 4d 6f | 75 73 65 45 78 69 74 28 |..Sub Mo|useExit(|
|00004e40| 29 92 01 27 49 66 20 74 | 68 65 20 75 73 65 72 20 |)..'If t|he user |
|00004e50| 69 73 20 64 72 61 67 67 | 69 6e 67 20 6f 66 66 20 |is dragg|ing off |
|00004e60| 74 68 65 20 62 75 74 74 | 6f 6e 20 77 68 65 6e 20 |the butt|on when |
|00004e70| 74 68 65 79 20 65 78 69 | 74 20 69 74 20 74 68 65 |they exi|t it the|
|00004e80| 20 69 6e 44 6f 77 6e 20 | 70 72 6f 70 65 72 74 79 | inDown |property|
|00004e90| 20 77 69 6c 6c 2d 27 62 | 65 20 74 72 75 65 2e 20 | will-'b|e true. |
|00004ea0| 20 46 69 72 65 73 20 74 | 68 65 20 75 70 20 73 74 | Fires t|he up st|
|00004eb0| 61 74 65 20 6f 66 20 74 | 68 65 20 62 75 74 74 6f |ate of t|he butto|
|00004ec0| 6e 2e 20 2a 27 45 6c 73 | 65 20 66 69 72 65 20 74 |n. *'Els|e fire t|
|00004ed0| 68 65 20 6e 6f 72 6d 61 | 6c 20 73 74 61 74 65 20 |he norma|l state |
|00004ee0| 6f 66 20 74 68 65 20 62 | 75 74 74 6f 6e 2e 00 16 |of the b|utton...|
|00004ef0| 69 66 20 69 6e 44 6f 77 | 6e 20 3d 20 66 61 6c 73 |if inDow|n = fals|
|00004f00| 65 20 74 68 65 6e 0d 27 | 6e 6f 72 6d 61 6c 20 73 |e then.'|normal s|
|00004f10| 74 61 74 65 09 73 74 61 | 74 65 20 3d 20 30 08 6e |tate.sta|te = 0.n|
|00004f20| 6f 72 6d 61 6c 28 29 04 | 65 6c 73 65 09 27 75 70 |ormal().|else.'up|
|00004f30| 20 73 74 61 74 65 09 73 | 74 61 74 65 20 3d 20 31 | state.s|tate = 1|
|00004f40| 04 75 70 28 29 06 65 6e | 64 20 69 66 07 45 6e 64 |.up().en|d if.End|
|00004f50| 20 53 75 62 0a 44 72 6f | 70 4f 62 6a 65 63 74 01 | Sub.Dro|pObject.|
|00004f60| 00 01 00 03 1f 53 75 62 | 20 44 72 6f 70 4f 62 6a |.....Sub| DropObj|
|00004f70| 65 63 74 28 6f 62 6a 20 | 41 73 20 44 72 61 67 49 |ect(obj |As DragI|
|00004f80| 74 65 6d 29 00 07 45 6e | 64 20 53 75 62 07 4d 6f |tem)..En|d Sub.Mo|
|00004f90| 75 73 65 55 70 02 0d 02 | 0d 21 27 53 75 62 20 4d |useUp...|.!'Sub M|
|00004fa0| 6f 75 73 65 55 70 28 58 | 20 41 73 20 49 6e 74 65 |ouseUp(X| As Inte|
|00004fb0| 67 65 72 2c 20 59 20 41 | 73 20 49 6e 74 65 67 65 |ger, Y A|s Intege|
|00004fc0| 72 29 1b 69 66 20 58 20 | 3c 20 77 69 64 74 68 20 |r).if X |< width |
|00004fd0| 61 6e 64 20 58 20 3e 20 | 30 20 74 68 65 6e 1c 69 |and X > |0 then.i|
|00004fe0| 66 20 59 20 3c 20 68 65 | 69 67 68 74 20 61 6e 64 |f Y < he|ight and|
|00004ff0| 20 59 20 3e 20 30 20 74 | 68 65 6e 8b 01 27 69 66 | Y > 0 t|hen..'if|
|00005000| 20 69 6e 73 69 64 65 20 | 74 68 65 20 62 75 74 74 | inside |the butt|
|00005010| 6f 6e 20 58 20 26 20 59 | 20 76 61 6c 75 65 73 20 |on X & Y| values |
|00005020| 77 68 65 6e 20 6d 6f 75 | 73 65 20 75 70 20 66 69 |when mou|se up fi|
|00005030| 72 65 20 62 75 74 74 6f | 6e 20 61 63 74 69 6f 6e |re butto|n action|
|00005040| 20 68 65 72 65 20 3d 29 | 00 8d 01 27 44 65 70 65 | here =)|...'Depe|
|00005050| 6e 64 69 6e 67 20 6f 6e | 20 74 68 65 20 61 63 74 |nding on| the act|
|00005060| 69 6f 6e 20 79 6f 75 20 | 6d 61 79 20 4e 4f 54 20 |ion you |may NOT |
|00005070| 6e 65 65 64 20 74 6f 20 | 73 77 69 74 63 68 20 74 |need to |switch t|
|00005080| 68 65 20 61 70 70 20 63 | 75 72 73 6f 72 20 62 61 |he app c|ursor ba|
|00005090| 63 6b 20 74 6f 20 61 20 | 0e 27 70 6f 69 6e 74 65 |ck to a |.'pointe|
|000050a0| 72 20 68 65 72 65 2e 15 | 61 70 70 2e 6d 6f 75 73 |r here..|app.mous|
|000050b0| 65 43 75 72 73 6f 72 20 | 3d 20 6e 69 6c 14 27 66 |eCursor |= nil.'f|
|000050c0| 69 72 69 6e 67 20 61 63 | 74 69 6f 6e 20 45 76 65 |iring ac|tion Eve|
|000050d0| 6e 74 06 41 63 74 69 6f | 6e 00 84 01 27 4d 6f 75 |nt.Actio|n...'Mou|
|000050e0| 73 65 20 69 73 20 73 74 | 69 6c 6c 20 6f 76 65 72 |se is st|ill over|
|000050f0| 20 74 68 65 20 62 75 74 | 74 6f 6e 20 61 74 20 74 | the but|ton at t|
|00005100| 68 69 73 20 70 6f 69 6e | 74 20 73 6f 20 66 69 72 |his poin|t so fir|
|00005110| 69 6e 67 20 74 68 65 20 | 75 70 20 73 74 61 74 65 |ing the |up state|
|00005120| 09 27 75 70 20 73 74 61 | 74 65 09 73 74 61 74 65 |.'up sta|te.state|
|00005130| 20 3d 20 31 04 75 70 28 | 29 00 94 01 27 53 65 74 | = 1.up(|)...'Set|
|00005140| 74 69 6e 67 20 74 68 65 | 20 69 6e 44 6f 77 6e 20 |ting the| inDown |
|00005150| 70 72 6f 70 65 72 74 79 | 20 74 6f 20 66 61 6c 73 |property| to fals|
|00005160| 65 20 62 65 63 61 75 73 | 65 20 74 68 65 20 75 73 |e becaus|e the us|
|00005170| 65 72 20 68 61 73 20 72 | 65 6c 65 61 73 65 64 20 |er has r|eleased |
|00005180| 74 68 65 20 6d 6f 75 73 | 65 20 62 75 74 74 6f 6e |the mous|e button|
|00005190| 0e 69 6e 44 6f 77 6e 20 | 3d 20 66 61 6c 73 65 06 |.inDown |= false.|
|000051a0| 72 65 74 75 72 6e 06 65 | 6e 64 20 69 66 06 65 6e |return.e|nd if.en|
|000051b0| 64 20 69 66 06 65 6e 64 | 20 69 66 00 0d 27 6e 6f |d if.end| if..'no|
|000051c0| 72 6d 61 6c 20 73 74 61 | 74 65 09 73 74 61 74 65 |rmal sta|te.state|
|000051d0| 20 3d 20 30 08 6e 6f 72 | 6d 61 6c 28 29 00 94 01 | = 0.nor|mal()...|
|000051e0| 27 53 65 74 74 69 6e 67 | 20 74 68 65 20 69 6e 44 |'Setting| the inD|
|000051f0| 6f 77 6e 20 70 72 6f 70 | 65 72 74 79 20 74 6f 20 |own prop|erty to |
|00005200| 66 61 6c 73 65 20 62 65 | 63 61 75 73 65 20 74 68 |false be|cause th|
|00005210| 65 20 75 73 65 72 20 68 | 61 73 20 72 65 6c 65 61 |e user h|as relea|
|00005220| 73 65 64 20 74 68 65 20 | 6d 6f 75 73 65 20 62 75 |sed the |mouse bu|
|00005230| 74 74 6f 6e 0e 69 6e 44 | 6f 77 6e 20 3d 20 66 61 |tton.inD|own = fa|
|00005240| 6c 73 65 00 27 27 73 77 | 69 74 63 68 69 6e 67 20 |lse.''sw|itching |
|00005250| 74 68 65 20 63 75 72 73 | 6f 72 20 62 61 63 6b 20 |the curs|or back |
|00005260| 74 6f 20 61 6e 20 61 72 | 72 6f 77 20 11 6d 6f 75 |to an ar|row .mou|
|00005270| 73 65 63 75 72 73 6f 72 | 20 3d 20 6e 69 6c 07 45 |secursor| = nil.E|
|00005280| 6e 64 20 53 75 62 09 4d | 6f 75 73 65 44 72 61 67 |nd Sub.M|ouseDrag|
|00005290| 05 17 05 17 24 29 53 75 | 62 20 4d 6f 75 73 65 44 |....$)Su|b MouseD|
|000052a0| 72 61 67 28 58 20 41 73 | 20 49 6e 74 65 67 65 72 |rag(X As| Integer|
|000052b0| 2c 20 59 20 41 73 20 49 | 6e 74 65 67 65 72 29 14 |, Y As I|nteger).|
|000052c0| 2f 2f 73 68 6f 75 6c 64 | 20 6e 65 76 65 72 20 66 |//should| never f|
|000052d0| 69 72 65 21 00 1b 69 66 | 20 58 20 3c 20 77 69 64 |ire!..if| X < wid|
|000052e0| 74 68 20 61 6e 64 20 58 | 20 3e 20 30 20 74 68 65 |th and X| > 0 the|
|000052f0| 6e 00 1c 69 66 20 59 20 | 3c 20 68 65 69 67 68 74 |n..if Y |< height|
|00005300| 20 61 6e 64 20 59 20 3e | 20 30 20 74 68 65 6e 00 | and Y >| 0 then.|
|00005310| 11 69 66 20 73 74 61 74 | 65 20 3d 20 31 20 74 68 |.if stat|e = 1 th|
|00005320| 65 6e 0b 27 64 6f 77 6e | 20 73 74 61 74 65 09 73 |en.'down| state.s|
|00005330| 74 61 74 65 20 3d 20 32 | 06 64 6f 77 6e 28 29 06 |tate = 2|.down().|
|00005340| 72 65 74 75 72 6e 06 65 | 6e 64 20 69 66 00 04 65 |return.e|nd if..e|
|00005350| 6c 73 65 00 11 69 66 20 | 73 74 61 74 65 20 3d 20 |lse..if |state = |
|00005360| 32 20 74 68 65 6e 09 27 | 75 70 20 73 74 61 74 65 |2 then.'|up state|
|00005370| 09 73 74 61 74 65 20 3d | 20 31 04 75 70 28 29 06 |.state =| 1.up().|
|00005380| 72 65 74 75 72 6e 06 65 | 6e 64 20 69 66 06 65 6e |return.e|nd if.en|
|00005390| 64 20 69 66 00 04 65 6c | 73 65 00 11 69 66 20 73 |d if..el|se..if s|
|000053a0| 74 61 74 65 20 3d 20 32 | 20 74 68 65 6e 09 27 75 |tate = 2| then.'u|
|000053b0| 70 20 73 74 61 74 65 09 | 73 74 61 74 65 20 3d 20 |p state.|state = |
|000053c0| 31 04 75 70 28 29 06 72 | 65 74 75 72 6e 06 65 6e |1.up().r|eturn.en|
|000053d0| 64 20 69 66 00 06 65 6e | 64 20 69 66 00 07 45 6e |d if..en|d if..En|
|000053e0| 64 20 53 75 62 09 4d 6f | 75 73 65 44 6f 77 6e 11 |d Sub.Mo|useDown.|
|000053f0| 0b 11 0b 13 39 46 75 6e | 63 74 69 6f 6e 20 4d 6f |....9Fun|ction Mo|
|00005400| 75 73 65 44 6f 77 6e 28 | 58 20 41 73 20 49 6e 74 |useDown(|X As Int|
|00005410| 65 67 65 72 2c 20 59 20 | 41 73 20 49 6e 74 65 67 |eger, Y |As Integ|
|00005420| 65 72 29 20 41 73 20 42 | 6f 6f 6c 65 61 6e 0b 27 |er) As B|oolean.'|
|00005430| 64 6f 77 6e 20 73 74 61 | 74 65 09 73 74 61 74 65 |down sta|te.state|
|00005440| 20 3d 20 32 06 64 6f 77 | 6e 28 29 00 93 01 27 69 | = 2.dow|n()...'i|
|00005450| 6e 44 6f 77 6e 20 69 73 | 20 61 20 70 72 6f 70 65 |nDown is| a prope|
|00005460| 72 74 79 20 74 68 61 74 | 20 69 73 20 74 65 6c 6c |rty that| is tell|
|00005470| 69 6e 67 20 74 68 65 20 | 6d 6f 75 73 65 45 78 69 |ing the |mouseExi|
|00005480| 74 20 6d 65 74 68 6f 64 | 20 74 68 61 74 20 74 68 |t method| that th|
|00005490| 65 20 6d 6f 75 73 65 20 | 68 61 73 20 62 65 65 6e |e mouse |has been|
|000054a0| 20 91 01 27 70 75 73 68 | 65 64 20 61 6e 64 20 69 | ..'push|ed and i|
|000054b0| 73 20 73 74 69 6c 6c 20 | 64 6f 77 6e 2e 20 20 49 |s still |down. I|
|000054c0| 66 20 69 6e 44 6f 77 6e | 20 69 73 20 74 72 75 65 |f inDown| is true|
|000054d0| 20 77 68 65 6e 20 74 68 | 65 20 6d 6f 75 73 65 45 | when th|e mouseE|
|000054e0| 78 69 74 20 6d 65 74 68 | 6f 64 20 69 73 20 66 69 |xit meth|od is fi|
|000054f0| 72 65 64 2c 2c 27 74 68 | 65 20 62 75 74 74 6f 6e |red,,'th|e button|
|00005500| 27 73 20 73 74 61 74 65 | 20 69 73 20 75 70 20 69 |'s state| is up i|
|00005510| 6e 73 74 65 61 64 20 6f | 66 20 6e 6f 72 6d 61 6c |nstead o|f normal|
|00005520| 2e 0d 69 6e 44 6f 77 6e | 20 3d 20 74 72 75 65 00 |..inDown| = true.|
|00005530| 94 01 27 73 65 74 74 69 | 6e 67 20 74 68 65 20 62 |..'setti|ng the b|
|00005540| 75 74 74 6f 6e 20 63 75 | 72 73 6f 72 20 74 6f 20 |utton cu|rsor to |
|00005550| 74 68 65 20 66 69 6e 67 | 65 72 20 70 6f 69 6e 74 |the fing|er point|
|00005560| 65 72 20 69 66 20 74 68 | 65 20 75 73 65 72 20 73 |er if th|e user s|
|00005570| 74 61 72 74 73 20 64 72 | 61 67 67 69 6e 67 20 61 |tarts dr|agging a|
|00005580| 72 6f 75 6e 64 20 12 27 | 69 6e 73 69 64 65 20 74 |round .'|inside t|
|00005590| 68 65 20 62 75 74 74 6f | 6e 2d 6d 6f 75 73 65 63 |he butto|n-mousec|
|000055a0| 75 72 73 6f 72 20 3d 20 | 61 70 70 2e 72 65 73 6f |ursor = |app.reso|
|000055b0| 75 72 63 65 46 6f 72 6b | 2e 67 65 74 63 75 72 73 |urceFork|.getcurs|
|000055c0| 6f 72 28 31 33 39 29 00 | 15 27 64 69 73 70 6c 61 |or(139).|.'displa|
|000055d0| 79 69 6e 67 20 70 6f 70 | 75 70 6d 65 6e 75 11 6d |ying pop|upmenu.m|
|000055e0| 65 2e 50 44 69 73 70 6c | 61 79 4d 65 6e 75 28 29 |e.PDispl|ayMenu()|
|000055f0| 00 0b 72 65 74 75 72 6e | 20 74 72 75 65 0c 45 6e |..return| true.En|
|00005600| 64 20 46 75 6e 63 74 69 | 6f 6e 05 43 6c 6f 73 65 |d Functi|on.Close|
|00005610| 07 00 07 00 09 0b 53 75 | 62 20 43 6c 6f 73 65 28 |......Su|b Close(|
|00005620| 29 07 43 6c 6f 73 65 28 | 29 00 16 69 66 20 6d 65 |).Close(|)..if me|
|00005630| 2e 50 4d 65 6e 75 48 56 | 61 6c 69 64 20 74 68 65 |.PMenuHV|alid the|
|00005640| 6e 3f 64 65 63 6c 61 72 | 65 20 73 75 62 20 44 69 |n?declar|e sub Di|
|00005650| 73 70 6f 73 65 4d 65 6e | 75 20 6c 69 62 20 22 49 |sposeMen|u lib "I|
|00005660| 6e 74 65 72 66 61 63 65 | 4c 69 62 22 20 28 74 68 |nterface|Lib" (th|
|00005670| 65 4d 65 6e 75 20 61 73 | 20 69 6e 74 65 67 65 72 |eMenu as| integer|
|00005680| 29 17 44 69 73 70 6f 73 | 65 4d 65 6e 75 20 50 4d |).Dispos|eMenu PM|
|00005690| 65 6e 75 48 61 6e 64 6c | 65 03 65 6e 64 00 07 45 |enuHandl|e.end..E|
|000056a0| 6e 64 20 53 75 62 04 4f | 70 65 6e 13 36 13 36 15 |nd Sub.O|pen.6.6.|
|000056b0| 0a 53 75 62 20 4f 70 65 | 6e 28 29 00 b0 01 64 65 |.Sub Ope|n()...de|
|000056c0| 63 6c 61 72 65 20 66 75 | 6e 63 74 69 6f 6e 20 4e |clare fu|nction N|
|000056d0| 65 77 4d 65 6e 75 20 4c | 69 62 20 22 49 6e 74 65 |ewMenu L|ib "Inte|
|000056e0| 72 66 61 63 65 4c 69 62 | 22 20 28 6d 65 6e 75 49 |rfaceLib|" (menuI|
|000056f0| 44 20 61 73 20 53 68 6f | 72 74 2c 20 6d 65 6e 75 |D as Sho|rt, menu|
|00005700| 54 69 74 6c 65 20 61 73 | 20 50 53 74 72 69 6e 67 |Title as| PString|
|00005710| 29 20 61 73 20 69 6e 74 | 65 67 65 72 20 49 6e 6c |) as int|eger Inl|
|00005720| 69 6e 65 36 38 4b 28 22 | 41 39 33 31 22 29 00 21 |ine68K("|A931").!|
|00005730| 6d 65 2e 4d 65 6e 75 49 | 44 20 3d 20 6d 65 2e 50 |me.MenuI|D = me.P|
|00005740| 47 65 74 55 6e 69 71 75 | 65 4d 65 6e 75 49 44 28 |GetUniqu|eMenuID(|
|00005750| 29 00 16 69 66 20 6d 65 | 2e 4d 65 6e 75 49 44 20 |)..if me|.MenuID |
|00005760| 3c 3e 20 30 20 74 68 65 | 6e 26 6d 65 2e 50 4d 65 |<> 0 the|n&me.PMe|
|00005770| 6e 75 48 61 6e 64 6c 65 | 20 3d 20 4e 65 77 4d 65 |nuHandle| = NewMe|
|00005780| 6e 75 28 6d 65 2e 4d 65 | 6e 75 49 44 2c 22 22 29 |nu(me.Me|nuID,"")|
|00005790| 15 6d 65 2e 50 4d 65 6e | 75 48 56 61 6c 69 64 20 |.me.PMen|uHValid |
|000057a0| 3d 20 74 72 75 65 03 65 | 6e 64 00 11 6d 65 2e 50 |= true.e|nd..me.P|
|000057b0| 4c 69 73 74 49 6e 64 65 | 78 20 3d 20 31 00 16 27 |ListInde|x = 1..'|
|000057c0| 73 65 74 74 69 6e 67 20 | 62 75 74 74 6f 6e 20 63 |setting |button c|
|000057d0| 6f 6c 6f 72 73 0b 73 65 | 74 43 6f 6c 6f 72 73 28 |olors.se|tColors(|
|000057e0| 29 00 06 4f 70 65 6e 28 | 29 00 2d 27 73 65 74 74 |)..Open(|).-'sett|
|000057f0| 69 6e 67 20 70 69 63 74 | 4e 6f 72 6d 61 6c 20 61 |ing pict|Normal a|
|00005800| 6e 64 20 70 69 63 74 20 | 61 72 72 6f 77 20 70 72 |nd pict |arrow pr|
|00005810| 6f 70 65 72 74 69 65 73 | 36 6d 65 2e 70 69 63 74 |operties|6me.pict|
|00005820| 4e 6f 72 6d 61 6c 20 3d | 20 61 70 70 2e 72 65 73 |Normal =| app.res|
|00005830| 6f 75 72 63 65 46 6f 72 | 6b 2e 67 65 74 43 69 63 |ourceFor|k.getCic|
|00005840| 6e 28 6d 65 2e 72 65 73 | 49 63 6f 6e 49 44 29 07 |n(me.res|IconID).|
|00005850| 45 6e 64 20 53 75 62 05 | 50 61 69 6e 74 04 00 04 |End Sub.|Paint...|
|00005860| 00 14 18 53 75 62 20 50 | 61 69 6e 74 28 67 20 41 |...Sub P|aint(g A|
|00005870| 73 20 47 72 61 70 68 69 | 63 73 29 10 27 64 72 61 |s Graphi|cs).'dra|
|00005880| 77 69 6e 67 20 63 6f 6e | 74 72 6f 6c 00 0b 73 65 |wing con|trol..se|
|00005890| 74 43 6f 6c 6f 72 73 28 | 29 00 29 27 64 72 61 77 |tColors(|).)'draw|
|000058a0| 69 6e 67 20 74 68 65 20 | 62 75 74 74 6f 6e 73 20 |ing the |buttons |
|000058b0| 69 6e 20 74 68 65 20 63 | 6f 72 72 65 63 74 20 73 |in the c|orrect s|
|000058c0| 74 61 74 65 00 11 69 66 | 20 73 74 61 74 65 20 3d |tate..if| state =|
|000058d0| 20 31 20 74 68 65 6e 09 | 27 75 70 20 73 74 61 74 | 1 then.|'up stat|
|000058e0| 65 04 75 70 28 29 00 15 | 65 6c 73 65 69 66 20 73 |e.up()..|elseif s|
|000058f0| 74 61 74 65 20 3d 20 32 | 20 74 68 65 6e 0b 27 64 |tate = 2| then.'d|
|00005900| 6f 77 6e 20 73 74 61 74 | 65 06 64 6f 77 6e 28 29 |own stat|e.down()|
|00005910| 00 15 65 6c 73 65 69 66 | 20 73 74 61 74 65 20 3d |..elseif| state =|
|00005920| 20 30 20 74 68 65 6e 0d | 27 6e 6f 72 6d 61 6c 20 | 0 then.|'normal |
|00005930| 73 74 61 74 65 08 6e 6f | 72 6d 61 6c 28 29 06 65 |state.no|rmal().e|
|00005940| 6e 64 20 69 66 07 45 6e | 64 20 53 75 62 00 00 00 |nd if.En|d Sub...|
+--------+-------------------------+-------------------------+--------+--------+